@@ -657,7 +657,7 @@ def _get(section_dict, key, default=None):
657657__version_date__ = str(__version_date_info__[0]) + "." + str(
658658 __version_date_info__[1]).zfill(2) + "." + str(__version_date_info__[2]).zfill(2)
659659__revision__ = __version_info__[3]
660- __revision_id__ = "$Id$"
660+ __revision_id__ = "$Id: c2c0b50b894b396413373201a6ec3270b2a93db7 $"
661661if(__version_info__[4] is not None):
662662 __version_date_plusrc__ = __version_date__ + \
663663 "-" + str(__version_date_info__[4])
@@ -3763,7 +3763,8 @@ def GetHeaderChecksum(inlist=None, checksumtype="md5", encodedata=True, formatsp
37633763 if encodedata and not isinstance(hdr_bytes, (bytes, bytearray, memoryview)):
37643764 hdr_bytes = _to_bytes(hdr_bytes)
37653765 hdr_bytes = bytes(hdr_bytes)
3766- saltkey = _to_bytes(saltkey)
3766+ if(saltkey is not None):
3767+ saltkey = _to_bytes(saltkey)
37673768 if CheckSumSupport(algo_key, hashlib_guaranteed):
37683769 if(saltkey is None):
37693770 h = hashlib.new(algo_key, hdr_bytes)
@@ -3781,7 +3782,8 @@ def GetFileChecksum(inbytes, checksumtype="md5", encodedata=True, formatspecs=__
37813782 - Falls back to one-shot for non-file-like inputs.
37823783 """
37833784 algo_key = (checksumtype or "md5").lower()
3784- saltkey = _to_bytes(saltkey)
3785+ if(saltkey is not None):
3786+ saltkey = _to_bytes(saltkey)
37853787 # file-like streaming
37863788 if hasattr(inbytes, "read"):
37873789 # hashlib
0 commit comments