catch errors thrown by os.tcgetpgrp(), patch provided by walters
This commit is contained in:
parent
79ef5b41f2
commit
b1a7b52e4e
1 changed files with 4 additions and 1 deletions
5
cli/koji
5
cli/koji
|
|
@ -551,7 +551,10 @@ def _progress_callback(uploaded, total, piece, time, total_time):
|
|||
sys.stdout.flush()
|
||||
|
||||
def _running_in_bg():
|
||||
if (not os.isatty(0)) or (os.getpgrp() != os.tcgetpgrp(0)):
|
||||
try:
|
||||
if (not os.isatty(0)) or (os.getpgrp() != os.tcgetpgrp(0)):
|
||||
return True
|
||||
except OSError, e:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue