diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py index 075defa47e5..c5cbb18dc9e 100644 --- a/tools/marvin/marvin/cloudstackConnection.py +++ b/tools/marvin/marvin/cloudstackConnection.py @@ -147,8 +147,10 @@ class CSConnection(object): ).replace("+", "%20")] ) for r in params] ) - signature = base64.encodestring(hmac.new( - self.securityKey, hash_str, hashlib.sha1).digest()).strip() + signature = base64.encodestring( + hmac.new(self.securityKey.encode('utf-8'), + hash_str.encode('utf-8'), + hashlib.sha1).digest()).strip() return signature def __sendPostReqToCS(self, url, payload): diff --git a/tools/marvin/marvin/marvinLog.py b/tools/marvin/marvin/marvinLog.py index 01ef904087d..c720186172b 100644 --- a/tools/marvin/marvin/marvinLog.py +++ b/tools/marvin/marvin/marvinLog.py @@ -40,7 +40,7 @@ class MarvinLog: def __new__(cls, logger_name): if not cls._instance: - cls._instance = super(MarvinLog, cls).__new__(cls, logger_name) + cls._instance = super(MarvinLog, cls).__new__(cls) return cls._instance def __init__(self, logger_name):