1
This commit is contained in:
parent
b4ea03b447
commit
4af43d5649
@ -14,3 +14,9 @@ def crc32(data):
|
||||
hash_code = binascii.crc32(data)
|
||||
assert hash_code >= 0
|
||||
return hash_code
|
||||
|
||||
def safeDiv(a, b):
|
||||
if b == 0:
|
||||
return 0
|
||||
else:
|
||||
return a / b
|
||||
|
Loading…
x
Reference in New Issue
Block a user