We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 095dcc9 commit cc7bb37Copy full SHA for cc7bb37
hererocks.py
@@ -419,8 +419,12 @@ def sha256_of_file(filename):
419
return hashlib.sha256(contents).hexdigest()
420
421
def strip_extensions(filename):
422
- # Just handle .zip and .tar.gz.
423
- return os.path.splitext(os.path.splitext(filename)[0])[0]
+ if filename.endswith(".zip"):
+ return filename[:-len(".zip")]
424
+ elif filename.endswith(".tar.gz"):
425
+ return filename[:-len(".tar.gz")]
426
+ else:
427
+ return filename
428
429
class Program(object):
430
def __init__(self, version):
0 commit comments