diff options
author | Filipp Lepalaan <f@230.to> | 2013-05-13 12:16:41 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-05-13 12:16:41 +0300 |
commit | ae52d8991615c53986950505814090f7548f0795 (patch) | |
tree | 62ea1bd9411b880ed97674291e7e9372e234ba4e /gsxws/core.py | |
parent | 0be5138170416dd40a09d8c046dbfbfd24c6c4d6 (diff) | |
download | py-gsxws-ae52d8991615c53986950505814090f7548f0795.tar.gz py-gsxws-ae52d8991615c53986950505814090f7548f0795.tar.bz2 py-gsxws-ae52d8991615c53986950505814090f7548f0795.zip |
Use GSX_ENV in session cache key
Diffstat (limited to 'gsxws/core.py')
-rw-r--r-- | gsxws/core.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gsxws/core.py b/gsxws/core.py index b39771e..3154e55 100644 --- a/gsxws/core.py +++ b/gsxws/core.py @@ -394,6 +394,8 @@ class GsxSession(GsxObject): _namespace = "glob:" def __init__(self, user_id, password, sold_to, language, timezone): + global GSX_ENV + self.userId = user_id self.password = password self.languageCode = language @@ -401,7 +403,7 @@ class GsxSession(GsxObject): self.serviceAccountNo = str(sold_to) md5 = hashlib.md5() - md5.update(user_id + self.serviceAccountNo) + md5.update(user_id + self.serviceAccountNo + GSX_ENV) self._cache_key = md5.hexdigest() self._cache = GsxCache(self._cache_key) @@ -433,11 +435,11 @@ class GsxSession(GsxObject): def connect(user_id, password, sold_to, - environment='it', - language='en', + environment=GSX_ENV, + language=GSX_LANG, timezone='CEST', - region='emea', - locale='en_XXX'): + region=GSX_REGION, + locale=GSX_LOCALE): """ Establishes connection with GSX Web Services. Returns the session ID of the new connection. |