ut: cli - test_running_in_bg

This commit is contained in:
Yuming Zhu 2016-10-13 19:28:42 +00:00 committed by Mike McLean
parent ebf4e88d7d
commit 56e955819b
2 changed files with 47 additions and 3 deletions

View file

@ -913,11 +913,9 @@ def _progress_callback(uploaded, total, piece, time, total_time):
def _running_in_bg():
try:
if (not os.isatty(0)) or (os.getpgrp() != os.tcgetpgrp(0)):
return True
return (not os.isatty(0)) or (os.getpgrp() != os.tcgetpgrp(0))
except OSError, e:
return True
return False
def handle_build(options, session, args):
"[build] Build a package from source"