dont break ox.API subclasses

This commit is contained in:
j 2013-11-03 16:39:57 +01:00
parent 714729fee7
commit 828223ad82

View file

@ -8,14 +8,19 @@ import gzip
import StringIO import StringIO
import urllib2 import urllib2
from . import __version__
from .utils import json from .utils import json
from .form import MultiPartForm from .form import MultiPartForm
__all__ = ['API'] __all__ = ['getAPI', 'API']
def getAPI(url, cj=None):
class A(API):
pass
return A(url, cj)
def API(url, cj=None):
class API(object): class API(object):
__version__ = 0.0 __version__ = __version__
__name__ = 'ox' __name__ = 'ox'
DEBUG = False DEBUG = False
debuglevel = 0 debuglevel = 0
@ -105,5 +110,3 @@ def API(url, cj=None):
form.add_field('data', json.dumps(data)) form.add_field('data', json.dumps(data))
return self._json_request(self.url, form) return self._json_request(self.url, form)
return API(url, cj)