PEP8 compliance
This commit is contained in:
@@ -1,3 +1,2 @@
|
||||
from controller import expose, validate, WSRoot
|
||||
from types import wsattr, wsproperty
|
||||
|
||||
|
||||
@@ -117,8 +117,8 @@ class WSRoot(object):
|
||||
r = dict(faultcode="Server",
|
||||
faultstring=str(excinfo[1]))
|
||||
if self._debug:
|
||||
r['debuginfo'] = ("Traceback:\n%s\n" %
|
||||
"\n".join(traceback.format_exception(*excinfo)))
|
||||
r['debuginfo'] = "Traceback:\n%s\n" % (
|
||||
"\n".join(traceback.format_exception(*excinfo)))
|
||||
return r
|
||||
|
||||
def _lookup_function(self, path):
|
||||
@@ -133,4 +133,3 @@ class WSRoot(object):
|
||||
raise exc.UnknownFunction('/'.join(path))
|
||||
|
||||
return a, a._wsme_definition
|
||||
|
||||
|
||||
@@ -3,9 +3,11 @@ import __builtin__
|
||||
if '_' not in __builtin__.__dict__:
|
||||
__builtin__._ = lambda s: s
|
||||
|
||||
|
||||
class ClientSideError(RuntimeError):
|
||||
pass
|
||||
|
||||
|
||||
class InvalidInput(ClientSideError):
|
||||
def __init__(self, fieldname, value, msg=''):
|
||||
self.fieldname = fieldname
|
||||
@@ -19,6 +21,7 @@ class InvalidInput(ClientSideError):
|
||||
def __str__(self):
|
||||
return unicode(self).encode('utf8', 'ignore')
|
||||
|
||||
|
||||
class UnknownFunction(ClientSideError):
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
|
||||
@@ -56,7 +56,7 @@ def binary_toxml(datatype, key, value):
|
||||
el.text = base64.encodestring(value)
|
||||
return el
|
||||
|
||||
|
||||
|
||||
class RestXmlProtocol(RestProtocol):
|
||||
name = 'REST+XML'
|
||||
dataformat = 'xml'
|
||||
|
||||
@@ -14,9 +14,9 @@ import wsme.types
|
||||
|
||||
warnings.filterwarnings('ignore', module='webob.dec')
|
||||
|
||||
|
||||
binarysample = r'\x00\xff\x43'
|
||||
|
||||
|
||||
class CallException(RuntimeError):
|
||||
def __init__(self, faultcode, faultstring, debuginfo):
|
||||
self.faultcode = faultcode
|
||||
|
||||
Reference in New Issue
Block a user