aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@0x00.co>2013-04-03 11:03:21 +0300
committerFilipp Lepalaan <f@0x00.co>2013-04-03 11:03:21 +0300
commita250685f1752d9eecb3b032f3b2dc3c7378acd90 (patch)
tree8bb4f9af0a542f054abc8a7c3f37aa42aac73c58 /gsxws.py
parent81cc7a253d7a34428fc60fd92cd316309e44e420 (diff)
downloadpy-gsxws-a250685f1752d9eecb3b032f3b2dc3c7378acd90.tar.gz
py-gsxws-a250685f1752d9eecb3b032f3b2dc3c7378acd90.tar.bz2
py-gsxws-a250685f1752d9eecb3b032f3b2dc3c7378acd90.zip
Survive without CLIENT
Diffstat (limited to 'gsxws.py')
-rwxr-xr-xgsxws.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/gsxws.py b/gsxws.py
index e3b9789..f6c635e 100755
--- a/gsxws.py
+++ b/gsxws.py
@@ -3,16 +3,17 @@
#coding=utf-8
"""
-Copyright (c) 2012, Filipp Lepalaan All rights reserved.
+Copyright (c) 2013, Filipp Lepalaan All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
-Redistributions of source code must retain the above copyright notice,
+- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
-Redistributions in binary form must reproduce the above copyright notice,
+- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -125,8 +126,10 @@ class GsxObject(object):
def __init__(self, *args, **kwargs):
self.data = kwargs
- self.dt = CLIENT.factory.create(self.dt)
- self.request_dt = CLIENT.factory.create(self.request_dt)
+
+ if CLIENT is not None:
+ self.dt = CLIENT.factory.create(self.dt)
+ self.request_dt = CLIENT.factory.create(self.request_dt)
def set_method(self, new_method):
self.method = new_method