diff --git a/bin/euscan b/bin/euscan index 441d479..4e2e10f 100755 --- a/bin/euscan +++ b/bin/euscan @@ -308,6 +308,9 @@ def main(): "for more informations" ) + if not (CONFIG['format'] or CONFIG['quiet']) and len(queries) > 1: + print("") + if CONFIG['progress']: on_progress_gen.next() print("\n", file=sys.stderr) diff --git a/pym/euscan/out.py b/pym/euscan/out.py index 8a505fc..65947ee 100644 --- a/pym/euscan/out.py +++ b/pym/euscan/out.py @@ -37,8 +37,10 @@ class ProgressHandler(object): def progress_bar(): on_progress = None - progress_bar = TermProgressBar(title="euscan") - progress_bar.file = sys.stderr + try: + progress_bar = TermProgressBar(fd=sys.stderr, title="euscan") + except TypeError: + progress_bar = TermProgressBar(title="euscan") progress_handler = ProgressHandler(progress_bar) on_progress = progress_handler.on_progress diff --git a/pym/euscan/scan.py b/pym/euscan/scan.py index 5d9fd06..86574ae 100644 --- a/pym/euscan/scan.py +++ b/pym/euscan/scan.py @@ -169,8 +169,7 @@ def scan_upstream(query, on_progress=None): is_current_version_stable = is_version_stable(ver) if len(result) > 0: if not (CONFIG['format'] or CONFIG['quiet']): - print("\n", file=sys.stderr) - + print("") for cp, url, version, handler, confidence in result: if CONFIG["ignore-pre-release"]: if not is_version_stable(version): @@ -179,6 +178,8 @@ def scan_upstream(query, on_progress=None): if is_current_version_stable and \ not is_version_stable(version): continue + if CONFIG['progress']: + print ("", file=sys.stderr) output.result(cp, version, url, handler, confidence) return result