From c6a19781a9558ef3fb35fa8f2601f4bd0ea45a44 Mon Sep 17 00:00:00 2001 From: Simba Zhang Date: Fri, 19 Aug 2016 21:57:14 -0700 Subject: [PATCH 1/2] To fix CI build in api_wraper.py --- pokemongo_bot/api_wrapper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pokemongo_bot/api_wrapper.py b/pokemongo_bot/api_wrapper.py index eff42055dc..c7b0e58b47 100644 --- a/pokemongo_bot/api_wrapper.py +++ b/pokemongo_bot/api_wrapper.py @@ -28,6 +28,9 @@ def __init__(self, config=None): self.useVanillaRequest = False self.config = config + if self.config.username is None: + ApiWrapper.DEVICE_ID = "3d65919ca1c2fc3a8e2bd7cc3f974c34" + return file_salt = None did_path = os.path.join(_base_dir, 'data', 'deviceid-%s.txt' % self.config.username) if os.path.exists(did_path): From 184f33f37c8ba534791f12d87da9f81bd829158e Mon Sep 17 00:00:00 2001 From: Simba Zhang Date: Fri, 19 Aug 2016 22:07:15 -0700 Subject: [PATCH 2/2] added self.config is none to make CI happy. --- pokemongo_bot/api_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokemongo_bot/api_wrapper.py b/pokemongo_bot/api_wrapper.py index c7b0e58b47..8f6c382149 100644 --- a/pokemongo_bot/api_wrapper.py +++ b/pokemongo_bot/api_wrapper.py @@ -28,7 +28,7 @@ def __init__(self, config=None): self.useVanillaRequest = False self.config = config - if self.config.username is None: + if self.config is None or self.config.username is None: ApiWrapper.DEVICE_ID = "3d65919ca1c2fc3a8e2bd7cc3f974c34" return file_salt = None