From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (unknown [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EAB5C1381FA for ; Wed, 14 May 2014 19:29:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 73E0CE0A5F; Wed, 14 May 2014 19:29:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 163B2E0A5F for ; Wed, 14 May 2014 19:29:28 +0000 (UTC) Received: from spoonbill.gentoo.org (unknown [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0B37D33F077 for ; Wed, 14 May 2014 19:29:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 926381818D for ; Wed, 14 May 2014 19:29:25 +0000 (UTC) From: "Devan Franchini" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Devan Franchini" Message-ID: <1400095499.925b90c710c2376b233d681e969418434f01cb59.twitch153@gentoo> Subject: [gentoo-commits] proj/layman:gsoc2014 commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/api.py X-VCS-Directories: layman/ X-VCS-Committer: twitch153 X-VCS-Committer-Name: Devan Franchini X-VCS-Revision: 925b90c710c2376b233d681e969418434f01cb59 X-VCS-Branch: gsoc2014 Date: Wed, 14 May 2014 19:29:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ba920b82-5696-43a2-b8e4-d4dab30a52ca X-Archives-Hash: f469aab3f85b395887a72c5090d9c6ff commit: 925b90c710c2376b233d681e969418434f01cb59 Author: Devan Franchini gentoo org> AuthorDate: Wed May 14 19:24:59 2014 +0000 Commit: Devan Franchini gentoo org> CommitDate: Wed May 14 19:24:59 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=925b90c7 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..763050d 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(str(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):