From 904c9ff5f98cea7975850bfa994b43d936691da4 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Tue, 3 May 2011 00:13:26 +0200 Subject: [PATCH] Fix typos and trailing spaces --- weboob/applications/galleroob/galleroob.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/weboob/applications/galleroob/galleroob.py b/weboob/applications/galleroob/galleroob.py index 11f08316..daf79b86 100644 --- a/weboob/applications/galleroob/galleroob.py +++ b/weboob/applications/galleroob/galleroob.py @@ -17,7 +17,6 @@ # You should have received a copy of the GNU Affero General Public License # along with weboob. If not, see . -import subprocess import sys import os from re import search, sub @@ -50,7 +49,7 @@ class GalleryListFormatter(IFormatter): if item['description'] is not NotLoaded: result += u'\n %-70s' % item['description'] return result - + class Galleroob(ReplApplication): APPNAME = 'galleroob' @@ -63,7 +62,7 @@ class Galleroob(ReplApplication): def __init__(self, *args, **kwargs): ReplApplication.__init__(self, *args, **kwargs) - + def do_search(self, pattern=None): """ search PATTERN @@ -75,7 +74,7 @@ class Galleroob(ReplApplication): self.set_formatter_header(u'Search pattern: %s' % pattern if pattern else u'Latest galleries') - for backend, gallery in self.do('iter_search_results', + for backend, gallery in self.do('iter_search_results', pattern=pattern, max_results=self.options.count): self.add_object(gallery) self.format(gallery) @@ -144,7 +143,7 @@ class Galleroob(ReplApplication): with open(name, 'w') as f: f.write(img.data) - os.chdir("..") + os.chdir(os.path.pardir) def do_info(self, line): """ @@ -156,7 +155,7 @@ class Galleroob(ReplApplication): gallery = self.get_object(_id, 'get_gallery') if not gallery: - print >>sys.gallery, 'Gallery not found: %s' % _id + print >>sys.stderr, 'Gallery not found: %s' % _id return self.format(gallery) self.flush()