Hopefully tighted exception handling to fight bad 4G connections on the train.
Revert if it breaks things, hasn't so far.
This commit is contained in:
parent
a4da7952da
commit
3307b7c6c2
1 changed files with 8 additions and 10 deletions
|
@ -697,7 +697,7 @@ def process_change_request(bug, comment, allcomments, firstfound, pkgdb, branche
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def create_branches(package, pkghost, pkghostlocal):
|
def create_branches(package, pkghost, pkghostlocal, processed):
|
||||||
'''If on pkgs01, run /usr/local/bin/pkgdb2branch.py directly. Otherwise,
|
'''If on pkgs01, run /usr/local/bin/pkgdb2branch.py directly. Otherwise,
|
||||||
call ssh.'''
|
call ssh.'''
|
||||||
hostname = os.uname()[1]
|
hostname = os.uname()[1]
|
||||||
|
@ -706,8 +706,12 @@ def create_branches(package, pkghost, pkghostlocal):
|
||||||
cmd.extend(['ssh', pkghost])
|
cmd.extend(['ssh', pkghost])
|
||||||
cmd.extend(['/usr/local/bin/pkgdb2branch.py', package])
|
cmd.extend(['/usr/local/bin/pkgdb2branch.py', package])
|
||||||
print "Calling pkgdb2branch.py...."
|
print "Calling pkgdb2branch.py...."
|
||||||
proc = subprocess.check_call(cmd, stdout=sys.stdout, stderr=sys.stderr)
|
try:
|
||||||
|
proc = subprocess.check_call(cmd, stdout=sys.stdout, stderr=sys.stderr)
|
||||||
|
except:
|
||||||
|
processed.append(package)
|
||||||
print
|
print
|
||||||
|
return processed
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
branches = {}
|
branches = {}
|
||||||
|
@ -770,19 +774,13 @@ if __name__ == '__main__':
|
||||||
if type == 'new':
|
if type == 'new':
|
||||||
(package, more) = process_new_request(i, j, comments['bugs'][str(i.id)]['comments'], firstfound, pkgdb, fas, branches)
|
(package, more) = process_new_request(i, j, comments['bugs'][str(i.id)]['comments'], firstfound, pkgdb, fas, branches)
|
||||||
if package:
|
if package:
|
||||||
try:
|
processed = create_branches(package, options.pkghost, options.pkghostlocal, processed)
|
||||||
create_branches(package, options.pkghost, options.pkghostlocal)
|
|
||||||
except:
|
|
||||||
processed.append(package)
|
|
||||||
if not more:
|
if not more:
|
||||||
break
|
break
|
||||||
elif type == 'change':
|
elif type == 'change':
|
||||||
(package, more) = process_change_request(i, j, comments['bugs'][str(i.id)]['comments'], firstfound, pkgdb, branches)
|
(package, more) = process_change_request(i, j, comments['bugs'][str(i.id)]['comments'], firstfound, pkgdb, branches)
|
||||||
if package:
|
if package:
|
||||||
try:
|
processed = create_branches(package, options.pkghost, options.pkghostlocal, processed)
|
||||||
create_branches(package, options.pkghost, options.pkghostlocal)
|
|
||||||
except:
|
|
||||||
processed.append(package)
|
|
||||||
if not more:
|
if not more:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue