Skip to content

Commit eb6e07a

Browse files
committed
Pep8 cleanup
1 parent 89d92f2 commit eb6e07a

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

django_xmlrpc/decorators.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class AuthenticationFailedException(Fault):
6060
"""
6161
def __init__(self):
6262
Fault.__init__(self, AUTHENTICATION_FAILED_CODE,
63-
_('Username and/or password is incorrect'))
63+
_('Username and/or password is incorrect'))
6464

6565

6666
class PermissionDeniedException(Fault):
@@ -99,7 +99,7 @@ def _xmlrpc_func(func):
9999
func._xmlrpc_signature = {
100100
'returns': returns,
101101
'args': args
102-
}
102+
}
103103
return func
104104

105105
return _xmlrpc_func
@@ -165,8 +165,8 @@ def __authenticated_call(username, password, *args):
165165
__authenticated_call.__doc__ = func.__doc__ + \
166166
"\nNote: Authentication is required."""
167167
if perm:
168-
__authenticated_call.__doc__ += ' this function requires ' \
169-
+ '"%s" permission.' % perm
168+
__authenticated_call.__doc__ += (' this function requires '
169+
'"%s" permission.' % perm)
170170

171171
return __authenticated_call
172172

django_xmlrpc/dispatcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ def system_methodSignature(self, method):
7070
sig = {
7171
'returns': 'string',
7272
'args': ['string' for arg in getargspec(func)[0]],
73-
}
73+
}
7474

7575
return [sig['returns']] + sig['args']

django_xmlrpc/views.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,21 @@ def handle_xmlrpc(request):
117117
try:
118118
mod = __import__(module, globals(), locals(), [attr])
119119
except ImportError as ex:
120-
raise ImproperlyConfigured("Error registering XML-RPC method: " \
121-
+ "module %s can't be imported" % module)
120+
raise ImproperlyConfigured(
121+
"Error registering XML-RPC method: "
122+
"module %s can't be imported" % module)
122123

123124
try:
124125
func = getattr(mod, attr)
125126
except AttributeError:
126-
raise ImproperlyConfigured('Error registering XML-RPC method: ' \
127-
+ 'module %s doesn\'t define a method "%s"' % (module, attr))
127+
raise ImproperlyConfigured(
128+
'Error registering XML-RPC method: '
129+
'module %s doesn\'t define a method "%s"' % (module, attr))
128130

129131
if not isinstance(func, Callable):
130-
raise ImproperlyConfigured('Error registering XML-RPC method: ' \
131-
+ '"%s" is not callable in module %s' % (attr, module))
132+
raise ImproperlyConfigured(
133+
'Error registering XML-RPC method: '
134+
'"%s" is not callable in module %s' % (attr, module))
132135

133136
xmlrpcdispatcher.register_function(func, name)
134137

0 commit comments

Comments
 (0)