From 14c3bdaa577abe0663b3aa07ed94b7ed8ffa57c6 Mon Sep 17 00:00:00 2001 From: Ed Holland Date: Thu, 6 Jun 2019 18:27:17 +0100 Subject: [PATCH] Fix key error --- datasketch/storage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/datasketch/storage.py b/datasketch/storage.py index 92e610c1..38c44ade 100644 --- a/datasketch/storage.py +++ b/datasketch/storage.py @@ -15,6 +15,7 @@ from pynamodb.connection.util import pythonic from pynamodb.attributes import UnicodeAttribute, BinaryAttribute import ulid + ddb = True except ImportError: ddb = None @@ -523,8 +524,8 @@ def has_key(self, key): return True def make_safe_table_name(name): - return name.decode('utf-8').replace('\\', '') - + return str(name)[2:-1].replace('\\', '') + class DDBSetStorage(UnorderedStorage, DDBListStorage): def __init__(self, config, name = None): self.name = name