More small tidyups

- switch to using sys.exit instead of exit
 - always exit with error-code 1
 - don't bother testing error-codes
 - documentation wording tweak
This commit is contained in:
Andrew Scheller
2016-12-18 03:33:50 +00:00
parent 117e4f5972
commit fc54667f34
3 changed files with 3 additions and 8 deletions

View File

@@ -45,7 +45,7 @@ def parse_args(args):
except argparse.ArgumentError as ex:
print('Error parsing arguments.')
parser.error(str(ex.message))
exit(-1)
sys.exit(1)
return args
@@ -57,7 +57,7 @@ def main():
pi_info().pprint(color=args.color)
except IOError:
print('This device is not a Raspberry Pi')
exit(2)
sys.exit(1)
else:
pi_info(args.revision).pprint(color=args.color)