@@ -120,7 +120,7 @@ def raw_to_typed(self, raw_data):
120
120
for raw_key in raw_data :
121
121
key = raw_key
122
122
if PY3K :
123
- key = raw_key .decode ('utf-8' )
123
+ key = raw_key .decode ()
124
124
125
125
# "NULL:NULL" is used as a placeholder for objects with no attributes
126
126
if key == "NULL" :
@@ -136,7 +136,7 @@ def raw_to_typed(self, raw_data):
136
136
typed_data [key [:- 1 ]] = value
137
137
else :
138
138
if PY3K :
139
- typed_data [key ] = raw_data [raw_key ].decode ('utf-8' )
139
+ typed_data [key ] = raw_data [raw_key ].decode ()
140
140
else :
141
141
typed_data [key ] = raw_data [raw_key ]
142
142
return typed_data
@@ -240,7 +240,7 @@ def get_keys(self, table, split=True):
240
240
for key in keys :
241
241
try :
242
242
if PY3K :
243
- key = key .decode ('utf-8' )
243
+ key = key .decode ()
244
244
if split :
245
245
(_ , row ) = key .split (self .TABLE_NAME_SEPARATOR , 1 )
246
246
data .append (self .deserialize_key (row ))
@@ -269,7 +269,7 @@ def get_table(self, table):
269
269
entry = self .raw_to_typed (client .hgetall (key ))
270
270
if entry != None :
271
271
if PY3K :
272
- key = key .decode ('utf-8' )
272
+ key = key .decode ()
273
273
(_ , row ) = key .split (self .TABLE_NAME_SEPARATOR , 1 )
274
274
data [self .deserialize_key (row )] = entry
275
275
else :
@@ -325,7 +325,7 @@ def get_config(self):
325
325
data = {}
326
326
for key in keys :
327
327
if PY3K :
328
- key = key .decode ('utf-8' )
328
+ key = key .decode ()
329
329
try :
330
330
(table_name , row ) = key .split (self .TABLE_NAME_SEPARATOR , 1 )
331
331
entry = self .raw_to_typed (client .hgetall (key ))
@@ -427,7 +427,7 @@ def _get_config(self, client, pipe, data, cursor):
427
427
cur: poition of next item to scan
428
428
"""
429
429
cur , keys = client .scan (cursor = cursor , match = '*' , count = self .REDIS_SCAN_BATCH_SIZE )
430
- keys = [key .decode ('utf-8' ) for key in keys if key != self .INIT_INDICATOR ]
430
+ keys = [key .decode () for key in keys if key != self .INIT_INDICATOR ]
431
431
for key in keys :
432
432
pipe .hgetall (key )
433
433
records = pipe .execute ()
0 commit comments