From 899682802805b107f0bae24f7a66a2f657c283ff Mon Sep 17 00:00:00 2001 From: Simba Zhang Date: Thu, 25 Aug 2016 15:14:41 -0700 Subject: [PATCH] Save to str format. --- pokemongo_bot/__init__.py | 4 ++-- pokemongo_bot/health_record/bot_event.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pokemongo_bot/__init__.py b/pokemongo_bot/__init__.py index 6356984025..842664d7ef 100644 --- a/pokemongo_bot/__init__.py +++ b/pokemongo_bot/__init__.py @@ -104,11 +104,11 @@ def __init__(self, config): client_id_file_path = os.path.join(_base_dir, 'data', 'mqtt_client_id') saved_info = shelve.open(client_id_file_path) if saved_info.has_key('client_id'): - self.config.client_id = str(saved_info['client_id']) + self.config.client_id = saved_info['client_id'] else: client_uuid = uuid.uuid4() self.config.client_id = str(client_uuid) - saved_info['client_id'] = client_uuid + saved_info['client_id'] = self.config.client_id saved_info.close() def start(self): diff --git a/pokemongo_bot/health_record/bot_event.py b/pokemongo_bot/health_record/bot_event.py index d406309219..28d3943a52 100644 --- a/pokemongo_bot/health_record/bot_event.py +++ b/pokemongo_bot/health_record/bot_event.py @@ -19,11 +19,11 @@ def __init__(self, config): client_id_file_path = os.path.join(_base_dir, 'data', 'client_id') saved_info = shelve.open(client_id_file_path) if saved_info.has_key('client_id'): - self.client_id = str(saved_info['client_id']) + self.client_id = saved_info['client_id'] else: client_uuid = uuid.uuid4() self.client_id = str(client_uuid) - saved_info['client_id'] = client_uuid + saved_info['client_id'] = self.client_id saved_info.close() # UniversalAnalytics can be reviewed here: # https://github.com/analytics-pros/universal-analytics-python