[Lsb-messages] /var/www/bzr/lsb/devel/appbat r1019: Update all booleans to use True/False, some were None/yes
Mats Wichmann
mats at linuxfoundation.org
Sun Mar 5 15:09:35 UTC 2017
------------------------------------------------------------
revno: 1019
committer: Mats Wichmann <mats at linuxfoundation.org>
branch nick: appbat
timestamp: Sun 2017-03-05 08:09:35 -0700
message:
Update all booleans to use True/False, some were None/yes
modified:
extras/entitycheck.py
extras/entitycheck_new.py
-------------- next part --------------
=== modified file 'extras/entitycheck.py'
--- a/extras/entitycheck.py 2017-01-06 16:23:17 +0000
+++ b/extras/entitycheck.py 2017-03-05 15:09:35 +0000
@@ -10,9 +10,10 @@
# Calling an external command (wget) is also possible
# Note: the internal fetcher may go away if wget works out
#
-"""Entity check
+"""Entity checker
-Checks a nALFS-style build area for required packages and patches
+Checks a build area for required packages and patches ("entities")
+as described by an entity file, and fetching missing ones if requested.
Command line options:
@@ -62,13 +63,13 @@
# Behavior defaults: generally should not change, since
# the command-line options are not set up to be inverses
# (i.e. if default is changed to true, no way to set back to false)
-generate_sums = None
-check_sums = None
-fetch_files = None
+generate_sums = False
+check_sums = False
+fetch_files = False
use_wget = False
-dry_run = None
+dry_run = False
noisy = True
-show_extras = None
+show_extras = False
delete_bad = False
prefer_fallback = False
@@ -587,20 +588,20 @@
if opt in ('--gensum', '-g'):
if check_sums:
usage(2, "check-sums and generate-sums are mutually exclusive")
- generate_sums = 'yes'
+ generate_sums = True
if opt in ('--checksum', '-c'):
if generate_sums:
usage(2, "check-sums and generate-sums are mutually exclusive")
- check_sums = 'yes'
+ check_sums = True
if opt in ('--sumfile', '-s'):
epaths['md5sum_file'] = arg
if opt in ('--fetch', '-f'):
- fetch_files = 'yes'
+ fetch_files = True
if opt in ('--updatefile', '-u'):
epaths['update_file'] = arg
if opt == '--dryrun':
- dry_run = 'yes'
- fetch_files = 'yes'
+ dry_run = True
+ fetch_files = True
if opt in ('--fallback', '-z'):
epaths['fallback_url'] = arg
if opt in ('--wget', '-w'):
@@ -608,7 +609,7 @@
if opt in ('--quiet', '-q'):
noisy = False
if opt == '--show-extras':
- show_extras = 'yes'
+ show_extras = True
if opt == '--delete-bad':
delete_bad = True
if opt == '--prefer-fallback':
=== modified file 'extras/entitycheck_new.py'
--- a/extras/entitycheck_new.py 2017-01-06 16:23:17 +0000
+++ b/extras/entitycheck_new.py 2017-03-05 15:09:35 +0000
@@ -10,9 +10,10 @@
# Calling an external command (wget) is also possible
# Note: the internal fetcher may go away if wget works out
#
-"""Entity check
+"""Entity checker
-Checks a nALFS-style build area for required packages and patches
+Checks a build area for required packages and patches ("entities")
+as described by an entity file, and fetching missing ones if requested.
Command line options:
@@ -63,13 +64,13 @@
# Behavior defaults: generally should not change, since
# the command-line options are not set up to be inverses
# (i.e. if default is changed to true, no way to set back to false)
-generate_sums = None
-check_sums = None
-fetch_files = None
+generate_sums = False
+check_sums = False
+fetch_files = False
use_wget = False
-dry_run = None
+dry_run = False
noisy = True
-show_extras = None
+show_extras = False
delete_bad = False
prefer_fallback = False
@@ -542,7 +543,7 @@
]
try:
opts, args = getopt.getopt(sys.argv[1:], shortopts, longopts)
-except getopt.error, msg:
+except getopt.error as msg:
usage(2, msg)
if opts:
@@ -558,20 +559,20 @@
if opt in ('--gensum', '-g'):
if check_sums:
usage(2, "check-sums and generate-sums are mutually exclusive")
- generate_sums = 'yes'
+ generate_sums = True
if opt in ('--checksum', '-c'):
if generate_sums:
usage(2, "check-sums and generate-sums are mutually exclusive")
- check_sums = 'yes'
+ check_sums = True
if opt in ('--sumfile', '-s'):
epaths['md5sum_file'] = arg
if opt in ('--fetch', '-f'):
- fetch_files = 'yes'
+ fetch_files = True
if opt in ('--updatefile', '-u'):
epaths['update_file'] = arg
if opt == '--dryrun':
- dry_run = 'yes'
- fetch_files = 'yes'
+ dry_run = True
+ fetch_files = True
if opt in ('--fallback', '-z'):
epaths['fallback_url'] = arg
if opt in ('--wget', '-w'):
@@ -579,7 +580,7 @@
if opt in ('--quiet', '-q'):
noisy = False
if opt == '--show-extras':
- show_extras = 'yes'
+ show_extras = True
if opt == '--delete-bad':
delete_bad = True
if opt == '--prefer-fallback':
More information about the lsb-messages
mailing list