From 47d234e1c567e7b09a350573ca3af091c18bb9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Fri, 15 Mar 2019 13:20:48 +0100 Subject: [PATCH] small fixex --- server/src/uds/REST/processors.py | 2 +- server/src/uds/core/managers/CryptoManager.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/uds/REST/processors.py b/server/src/uds/REST/processors.py index 9b99c5bda..623c2ae87 100644 --- a/server/src/uds/REST/processors.py +++ b/server/src/uds/REST/processors.py @@ -100,7 +100,7 @@ class ContentProcessor(object): return obj elif isinstance(obj, dict): res = {} - for k, v in obj.item(): + for k, v in obj.items(): res[k] = ContentProcessor.procesForRender(v) return res elif isinstance(obj, (list, tuple, types.GeneratorType)): diff --git a/server/src/uds/core/managers/CryptoManager.py b/server/src/uds/core/managers/CryptoManager.py index 79888f325..be9425732 100644 --- a/server/src/uds/core/managers/CryptoManager.py +++ b/server/src/uds/core/managers/CryptoManager.py @@ -182,12 +182,12 @@ class CryptoManager(object): if obj is None: obj = self.randomString() self._counter += 1 - elif isinstance(obj, six.binary_type): + elif isinstance(obj, bytes): obj = obj.decode('utf8') # To binary else: obj = '{}'.format(obj) - return six.text_type(uuid.uuid5(self._namespace, obj)).lower() # I believe uuid returns a lowercase uuid always, but in case... :) + return str(uuid.uuid5(self._namespace, obj)).lower() # I believe uuid returns a lowercase uuid always, but in case... :) def randomString(self, length=40): return ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(length))