Code cleanup

This commit is contained in:
Paweł Jastrzębski
2017-11-02 10:28:43 +01:00
parent 7c0b78350d
commit a695a4c151
8 changed files with 109 additions and 132 deletions
+4 -4
View File
@@ -73,8 +73,8 @@ def walkLevel(some_dir, level=1):
del dirs[:]
def md5Checksum(filePath):
with open(filePath, 'rb') as fh:
def md5Checksum(fpath):
with open(fpath, 'rb') as fh:
m = md5()
while True:
data = fh.read(8192)
@@ -84,8 +84,8 @@ def md5Checksum(filePath):
return m.hexdigest()
def check7ZFile(filePath):
with open(filePath, 'rb') as fh:
def check7ZFile(fpath):
with open(fpath, 'rb') as fh:
header = fh.read(6)
return header == b"7z\xbc\xaf'\x1c"