merge-topic.py: better error handling
Signed-off-by: Scott Little <scott.little@windriver.com> Change-Id: I42d06386d6514b732340f33d5d9ec9c4e516dd61
This commit is contained in:
@@ -322,7 +322,8 @@ def handleRepo(args):
|
|||||||
pprint.pprint(e)
|
pprint.pprint(e)
|
||||||
if dargs['merge_fixer'] and not dargs['dry_run']:
|
if dargs['merge_fixer'] and not dargs['dry_run']:
|
||||||
print('Using merge fixer!')
|
print('Using merge fixer!')
|
||||||
runMergeFixer(dargs, project_path, tool_cwd)
|
rc = runMergeFixer(dargs, project_path, tool_cwd)
|
||||||
|
return rc
|
||||||
else:
|
else:
|
||||||
print('Check for unresolved merge conflict')
|
print('Check for unresolved merge conflict')
|
||||||
return False
|
return False
|
||||||
@@ -447,10 +448,14 @@ def main():
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if hasattr(args, 'handle'):
|
if hasattr(args, 'handle'):
|
||||||
args.handle(args)
|
rc = args.handle(args)
|
||||||
|
if not rc:
|
||||||
|
return 1
|
||||||
else:
|
else:
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
exit_code = main()
|
||||||
|
sys.exit(exit_code)
|
||||||
|
Reference in New Issue
Block a user