diff options
Diffstat (limited to 'gsxws.py')
-rwxr-xr-x | gsxws.py | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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 |