aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws/core.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-05-13 19:32:33 +0300
committerFilipp Lepalaan <f@230.to>2013-05-13 19:32:33 +0300
commitac36a003cdf90e968bd95dc43b41bb329ec7448a (patch)
tree6e5c7c454e23ee3ebd92021b449e1b23e7c74f7a /gsxws/core.py
parent3e2c2d613544b04d120d96b5064bb3e67159c0a8 (diff)
downloadpy-gsxws-ac36a003cdf90e968bd95dc43b41bb329ec7448a.tar.gz
py-gsxws-ac36a003cdf90e968bd95dc43b41bb329ec7448a.tar.bz2
py-gsxws-ac36a003cdf90e968bd95dc43b41bb329ec7448a.zip
Try to identify files better
Diffstat (limited to 'gsxws/core.py')
-rw-r--r--gsxws/core.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/gsxws/core.py b/gsxws/core.py
index c8f9cec..b2d9b89 100644
--- a/gsxws/core.py
+++ b/gsxws/core.py
@@ -292,9 +292,10 @@ class GsxObject(object):
super(GsxObject, self).__setattr__(name, value)
return
- if isinstance(value, file):
+ if hasattr(value, "fileno"):
if not hasattr(self, "fileName"):
super(GsxObject, self).__setattr__("fileName", value.name)
+
value = base64.b64encode(value.read())
if isinstance(value, int):
@@ -414,6 +415,7 @@ class GsxObject(object):
class GsxSession(GsxObject):
+
userId = ""
password = ""
languageCode = ""
@@ -442,9 +444,8 @@ class GsxSession(GsxObject):
def get_session(self):
session = ET.Element("userSession")
- session_id = ET.Element("userSessionId")
+ session_id = ET.SubElement(session, "userSessionId")
session_id.text = self._session_id
- session.append(session_id)
return session
def login(self):