euscan: fix some \n issues
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
This commit is contained in:
parent
8d65eaea1f
commit
6dce7707c8
@ -308,6 +308,9 @@ def main():
|
|||||||
"for more informations"
|
"for more informations"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not (CONFIG['format'] or CONFIG['quiet']) and len(queries) > 1:
|
||||||
|
print("")
|
||||||
|
|
||||||
if CONFIG['progress']:
|
if CONFIG['progress']:
|
||||||
on_progress_gen.next()
|
on_progress_gen.next()
|
||||||
print("\n", file=sys.stderr)
|
print("\n", file=sys.stderr)
|
||||||
|
@ -37,8 +37,10 @@ class ProgressHandler(object):
|
|||||||
|
|
||||||
def progress_bar():
|
def progress_bar():
|
||||||
on_progress = None
|
on_progress = None
|
||||||
|
try:
|
||||||
|
progress_bar = TermProgressBar(fd=sys.stderr, title="euscan")
|
||||||
|
except TypeError:
|
||||||
progress_bar = TermProgressBar(title="euscan")
|
progress_bar = TermProgressBar(title="euscan")
|
||||||
progress_bar.file = sys.stderr
|
|
||||||
|
|
||||||
progress_handler = ProgressHandler(progress_bar)
|
progress_handler = ProgressHandler(progress_bar)
|
||||||
on_progress = progress_handler.on_progress
|
on_progress = progress_handler.on_progress
|
||||||
|
@ -169,8 +169,7 @@ def scan_upstream(query, on_progress=None):
|
|||||||
is_current_version_stable = is_version_stable(ver)
|
is_current_version_stable = is_version_stable(ver)
|
||||||
if len(result) > 0:
|
if len(result) > 0:
|
||||||
if not (CONFIG['format'] or CONFIG['quiet']):
|
if not (CONFIG['format'] or CONFIG['quiet']):
|
||||||
print("\n", file=sys.stderr)
|
print("")
|
||||||
|
|
||||||
for cp, url, version, handler, confidence in result:
|
for cp, url, version, handler, confidence in result:
|
||||||
if CONFIG["ignore-pre-release"]:
|
if CONFIG["ignore-pre-release"]:
|
||||||
if not is_version_stable(version):
|
if not is_version_stable(version):
|
||||||
@ -179,6 +178,8 @@ def scan_upstream(query, on_progress=None):
|
|||||||
if is_current_version_stable and \
|
if is_current_version_stable and \
|
||||||
not is_version_stable(version):
|
not is_version_stable(version):
|
||||||
continue
|
continue
|
||||||
|
if CONFIG['progress']:
|
||||||
|
print ("", file=sys.stderr)
|
||||||
output.result(cp, version, url, handler, confidence)
|
output.result(cp, version, url, handler, confidence)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
Loading…
Reference in New Issue
Block a user