Skip to content
Browse files

Pep8 cleanup

  • Loading branch information...
1 parent 89d92f2 commit eb6e07a589c545217d20568cc239fb9fa6aa1419 @Fantomas42 committed
Showing with 14 additions and 11 deletions.
  1. +4 −4 django_xmlrpc/decorators.py
  2. +1 −1 django_xmlrpc/dispatcher.py
  3. +9 −6 django_xmlrpc/views.py
View
8 django_xmlrpc/decorators.py
@@ -60,7 +60,7 @@ class AuthenticationFailedException(Fault):
"""
def __init__(self):
Fault.__init__(self, AUTHENTICATION_FAILED_CODE,
- _('Username and/or password is incorrect'))
+ _('Username and/or password is incorrect'))
class PermissionDeniedException(Fault):
@@ -99,7 +99,7 @@ def _xmlrpc_func(func):
func._xmlrpc_signature = {
'returns': returns,
'args': args
- }
+ }
return func
return _xmlrpc_func
@@ -165,8 +165,8 @@ def __authenticated_call(username, password, *args):
__authenticated_call.__doc__ = func.__doc__ + \
"\nNote: Authentication is required."""
if perm:
- __authenticated_call.__doc__ += ' this function requires ' \
- + '"%s" permission.' % perm
+ __authenticated_call.__doc__ += (' this function requires '
+ '"%s" permission.' % perm)
return __authenticated_call
View
2 django_xmlrpc/dispatcher.py
@@ -70,6 +70,6 @@ def system_methodSignature(self, method):
sig = {
'returns': 'string',
'args': ['string' for arg in getargspec(func)[0]],
- }
+ }
return [sig['returns']] + sig['args']
View
15 django_xmlrpc/views.py
@@ -117,18 +117,21 @@ def handle_xmlrpc(request):
try:
mod = __import__(module, globals(), locals(), [attr])
except ImportError as ex:
- raise ImproperlyConfigured("Error registering XML-RPC method: " \
- + "module %s can't be imported" % module)
+ raise ImproperlyConfigured(
+ "Error registering XML-RPC method: "
+ "module %s can't be imported" % module)
try:
func = getattr(mod, attr)
except AttributeError:
- raise ImproperlyConfigured('Error registering XML-RPC method: ' \
- + 'module %s doesn\'t define a method "%s"' % (module, attr))
+ raise ImproperlyConfigured(
+ 'Error registering XML-RPC method: '
+ 'module %s doesn\'t define a method "%s"' % (module, attr))
if not isinstance(func, Callable):
- raise ImproperlyConfigured('Error registering XML-RPC method: ' \
- + '"%s" is not callable in module %s' % (attr, module))
+ raise ImproperlyConfigured(
+ 'Error registering XML-RPC method: '
+ '"%s" is not callable in module %s' % (attr, module))
xmlrpcdispatcher.register_function(func, name)

0 comments on commit eb6e07a

Please sign in to comment.
Something went wrong with that request. Please try again.