Skip to content

Commit

Permalink
Save to str format.
Browse files Browse the repository at this point in the history
  • Loading branch information
solderzzc committed Aug 25, 2016
1 parent cc22fe9 commit 8996828
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pokemongo_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions pokemongo_bot/health_record/bot_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8996828

Please sign in to comment.