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