Skip to content

Commit f649d6e

Browse files
committed
encode sig before hashing #17
1 parent 72009c0 commit f649d6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cloudwatchmon/cloud_watch_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ def __init__(self, fnc):
4444
def __call__(self, *args, **kwargs):
4545
sig = ":".join([VERSION, str(self.fnc.__name__), str(args), str(kwargs)])
4646

47+
sig_hash = hashlib.md5(sig.encode('utf-8')).hexdigest()
4748
filename = os.path.join(META_DATA_CACHE_DIR, '{0}-{1}.bin'
48-
.format(self.CLIENT_NAME,
49-
hashlib.md5(sig).hexdigest()))
49+
.format(self.CLIENT_NAME, sig_hash))
5050

5151
if os.path.exists(filename):
5252
mtime = os.path.getmtime(filename)

0 commit comments

Comments
 (0)