euscanwww: Removing duplicated code

Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
volpino
2012-06-08 14:43:18 +02:00
parent 43e996d83d
commit b43bf8fa28
4 changed files with 20 additions and 22 deletions

View File

@ -271,26 +271,15 @@ def main():
output.eerror('%s: %s' % (query, str(err)))
exit_helper(1)
if not CONFIG['quiet'] and not CONFIG['format']:
print()
if (CONFIG['format'] or CONFIG['quiet']) and isatty:
on_progress_gen.next()
print("\n", file=sys.stderr)
if ret is not None:
if len(ret) > 0:
for cp, url, version, handler, confidence in ret:
output.result(cp, version, url, handler, confidence)
if (CONFIG['format'] or CONFIG['quiet']) and isatty:
print("\n", file=sys.stderr)
elif not CONFIG['quiet']:
output.ewarn(
"Didn't find any new version, check package's homepage " +
"for more informations"
)
if not ret and not CONFIG['quiet']:
output.ewarn(
"Didn't find any new version, check package's homepage " +
"for more informations"
)
output.set_query(None)