Skip to content

Commit 514d0e3

Browse files
authored
Add files via upload
1 parent 2f2cc81 commit 514d0e3

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

pyfoxfile.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ def _get(section_dict, key, default=None):
658658
__version_date__ = str(__version_date_info__[0]) + "." + str(
659659
__version_date_info__[1]).zfill(2) + "." + str(__version_date_info__[2]).zfill(2)
660660
__revision__ = __version_info__[3]
661-
__revision_id__ = "$Id$"
661+
__revision_id__ = "$Id: c04591e4a924fda4b8f7e1415268a2fc06c83124 $"
662662
if(__version_info__[4] is not None):
663663
__version_date_plusrc__ = __version_date__ + \
664664
"-" + str(__version_date_info__[4])
@@ -3764,7 +3764,8 @@ def GetHeaderChecksum(inlist=None, checksumtype="md5", encodedata=True, formatsp
37643764
if encodedata and not isinstance(hdr_bytes, (bytes, bytearray, memoryview)):
37653765
hdr_bytes = _to_bytes(hdr_bytes)
37663766
hdr_bytes = bytes(hdr_bytes)
3767-
saltkey = _to_bytes(saltkey)
3767+
if(saltkey is not None):
3768+
saltkey = _to_bytes(saltkey)
37683769
if CheckSumSupport(algo_key, hashlib_guaranteed):
37693770
if(saltkey is None):
37703771
h = hashlib.new(algo_key, hdr_bytes)
@@ -3782,7 +3783,8 @@ def GetFileChecksum(inbytes, checksumtype="md5", encodedata=True, formatspecs=__
37823783
- Falls back to one-shot for non-file-like inputs.
37833784
"""
37843785
algo_key = (checksumtype or "md5").lower()
3785-
saltkey = _to_bytes(saltkey)
3786+
if(saltkey is not None):
3787+
saltkey = _to_bytes(saltkey)
37863788
# file-like streaming
37873789
if hasattr(inbytes, "read"):
37883790
# hashlib

0 commit comments

Comments
 (0)