public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Devan Franchini" <twitch153@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/layman:gsoc2014 commit in: layman/
Date: Fri, 16 May 2014 01:07:06 +0000 (UTC)	[thread overview]
Message-ID: <1400202356.6cf1b5626a81d9bfbf4ad4125df9719760144837.twitch153@gentoo> (raw)

commit:     6cf1b5626a81d9bfbf4ad4125df9719760144837
Author:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Wed May 14 19:24:59 2014 +0000
Commit:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Fri May 16 01:05:56 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=6cf1b562

layman/api.py: Corrects output of repos and stderr

Due to repos coming in as a binary string, it needed to be converted
to a normal string before joining it in the debug message or it will
cause runtime failures. Due to 2to3 overlooking the print statement
on line 513, this has also been corrected along with a check to see if
the repos variable is an instance of type str instead of type basestring
which is no longer available in py3.

---
 layman/api.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/layman/api.py b/layman/api.py
index f36be0a..7dd5ea7 100755
--- a/layman/api.py
+++ b/layman/api.py
@@ -90,7 +90,7 @@ class LaymanAPI(object):
         converting a string to a list[string] if it is not already a list.
         produces and error message if it is any other type
         returns repos as list always"""
-        if isinstance(repos, basestring):
+        if isinstance(repos, str):
             repos = [repos]
         # else assume it is an iterable, if not it will error
         return [encode(i) for i in repos]
@@ -299,7 +299,7 @@ class LaymanAPI(object):
         @param update_news: bool, defaults to False
         @rtype bool or {'repo-id': bool,...}
         """
-        self.output.debug("API.sync(); repos to sync = %s" % ', '.join(repos), 5)
+        self.output.debug("API.sync(); repos to sync = %s" % ', '.join((x.decode() if isinstance(x, bytes) else x) for x in repos), 5)
         fatals = []
         warnings = []
         success  = []
@@ -513,7 +513,7 @@ class LaymanAPI(object):
         self._error_messages.append(message)
         self.output.debug("API._error(); _error_messages = %s" % str(self._error_messages), 4)
         if self.report_errors:
-            print >>self.config['stderr'], message
+            print(message, file=self.config['stderr'])
 
 
     def get_errors(self):


             reply	other threads:[~2014-05-16  1:07 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16  1:07 Devan Franchini [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-08-15 23:59 [gentoo-commits] proj/layman:master commit in: layman/ Devan Franchini
2014-08-16  0:00 ` [gentoo-commits] proj/layman:gsoc2014 " Devan Franchini
2014-08-15 22:32 Devan Franchini
2014-08-15 22:32 Devan Franchini
2014-08-15 22:32 Devan Franchini
2014-08-15 22:32 Devan Franchini
2014-06-27  4:07 Devan Franchini
2014-06-27  4:07 Devan Franchini
2014-06-27  4:07 Devan Franchini
2014-06-16  3:40 [gentoo-commits] proj/layman:master " Brian Dolbec
2014-06-16  3:37 ` [gentoo-commits] proj/layman:gsoc2014 " Brian Dolbec
2014-06-16  3:40 [gentoo-commits] proj/layman:master " Brian Dolbec
2014-06-16  3:37 ` [gentoo-commits] proj/layman:gsoc2014 " Brian Dolbec
2014-06-16  3:40 [gentoo-commits] proj/layman:master " Brian Dolbec
2014-06-16  3:37 ` [gentoo-commits] proj/layman:gsoc2014 " Brian Dolbec
2014-06-16  3:37 Brian Dolbec
2014-06-16  3:37 Brian Dolbec
2014-06-16  3:37 Brian Dolbec
2014-06-16  3:37 Brian Dolbec
2014-05-16  2:30 Devan Franchini
2014-05-16  1:07 Devan Franchini
2014-05-16  1:07 Devan Franchini
2014-05-16  1:07 Devan Franchini
2014-05-16  1:07 Devan Franchini
2014-05-16  1:07 Devan Franchini
2014-05-16  1:07 Devan Franchini
2014-05-16  1:07 Devan Franchini
2014-05-16  1:07 Devan Franchini
2014-05-16  1:07 Devan Franchini
2014-05-16  1:07 Devan Franchini
2014-05-16  0:58 Devan Franchini
2014-05-16  0:58 Devan Franchini
2014-05-16  0:57 Devan Franchini
2014-05-15 20:46 Devan Franchini
2014-05-15 20:46 Devan Franchini
2014-05-15 20:37 Devan Franchini
2014-05-15 20:30 Devan Franchini
2014-05-15 20:02 Devan Franchini
2014-05-15  0:04 Devan Franchini
2014-05-14 23:54 Devan Franchini
2014-05-14 23:49 Devan Franchini
2014-05-14 23:49 Devan Franchini
2014-05-14 23:49 Devan Franchini
2014-05-14 23:49 Devan Franchini
2014-05-14 23:49 Devan Franchini
2014-05-14 23:49 Devan Franchini
2014-05-14 23:49 Devan Franchini
2014-05-14 23:49 Devan Franchini
2014-05-14 23:49 Devan Franchini
2014-05-14 23:49 Devan Franchini
2014-05-14 23:49 Devan Franchini
2014-05-14 22:16 Devan Franchini
2014-05-14 22:08 Devan Franchini
2014-05-14 21:42 Devan Franchini
2014-05-14 21:30 Devan Franchini
2014-05-14 21:15 Devan Franchini
2014-05-14 21:15 Devan Franchini
2014-05-14 19:29 Devan Franchini
2014-05-14 18:55 Devan Franchini
2014-05-14 18:44 Devan Franchini
2014-05-14 17:32 Devan Franchini
2014-05-14  3:21 Devan Franchini
2014-05-14  0:37 Devan Franchini
2014-05-07 22:21 Devan Franchini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400202356.6cf1b5626a81d9bfbf4ad4125df9719760144837.twitch153@gentoo \
    --to=twitch153@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox