From d7bf130fdae66fa38118c07d2d0e27942e0982a2 Mon Sep 17 00:00:00 2001 From: volpino Date: Thu, 28 Jun 2012 12:43:46 +0200 Subject: [PATCH] euscan: minor fixes Signed-off-by: volpino --- bin/euscan | 3 ++- pym/euscan/handlers/github.py | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/euscan b/bin/euscan index 89f61bf..963193f 100755 --- a/bin/euscan +++ b/bin/euscan @@ -251,7 +251,8 @@ def main(): on_progress(maxval=len(queries) * 100, increment=0) for query in queries: - on_progress(increment=10, label=query) + if CONFIG["progress"]: + on_progress(increment=10, label=query) ret = [] diff --git a/pym/euscan/handlers/github.py b/pym/euscan/handlers/github.py index 920e6ef..ac5baca 100644 --- a/pym/euscan/handlers/github.py +++ b/pym/euscan/handlers/github.py @@ -35,11 +35,13 @@ def scan(cpv, url): # now create a filename-matching regexp # XXX: supposedly replace first with (?P...) # and remaining ones with (?P=foo) - fnre = re.compile('^%s$' % re.escape(filename).replace(re.escape(ver), '(.*?)')) + fnre = re.compile('^%s$' % \ + re.escape(filename).replace(re.escape(ver), '(.*?)')) - output.einfo("Using github API for: " + '/'.join(package)) + output.einfo("Using github API for: " + '/'.join(filename)) - dlreq = urllib2.urlopen('https://api.github.com/repos/%s/%s/downloads' % (user, project)) + dlreq = urllib2.urlopen('https://api.github.com/repos/%s/%s/downloads' % \ + (user, project)) dls = json.load(dlreq) for dl in dls: