Bug 1455143 - Remove hash name validation; r?Build
Garbage in garbage out. Let's make this code simpler.
MozReview-Commit-ID: Gv0ZcMacyOX
--- a/build/checksums.py
+++ b/build/checksums.py
@@ -127,23 +127,16 @@ def main():
# Set up logging
setup_logging(loglevel)
logger = logging.getLogger('checksums.py')
# Validate the digest type to use
if not options.digests:
options.digests = ['sha1']
- try:
- for digest in options.digests:
- hashlib.new(digest)
- except ValueError as ve:
- logger.error('Could not create a "%s" hash object (%s)' %
- (digest, ve.args[0]))
- exit(1)
# Validate the files to checksum
files = []
for i in args:
if os.path.exists(i):
files.append(i)
else:
logger.info('File "%s" was not found on the filesystem' % i)