aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2013-05-19 01:14:46 +0200
committerElrond <elrond+mediagoblin.org@samba-tng.org>2013-05-20 19:35:16 +0200
commitd6c3375a781efd13a185b67e0f084c460c1e3cc6 (patch)
tree25fce9ce18b08bb219091bfe55f0b1043ba9b504
parent1b6a2b85e11b18a6cdb69f23b6100f803ba7ac5b (diff)
downloadmediagoblin-d6c3375a781efd13a185b67e0f084c460c1e3cc6.tar.lz
mediagoblin-d6c3375a781efd13a185b67e0f084c460c1e3cc6.tar.xz
mediagoblin-d6c3375a781efd13a185b67e0f084c460c1e3cc6.zip
A bit of pep8 and small typo fix.
-rw-r--r--mediagoblin/plugins/piwigo/tools.py4
-rw-r--r--mediagoblin/tests/test_piwigo.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/plugins/piwigo/tools.py b/mediagoblin/plugins/piwigo/tools.py
index 400be615..f060e9f8 100644
--- a/mediagoblin/plugins/piwigo/tools.py
+++ b/mediagoblin/plugins/piwigo/tools.py
@@ -113,7 +113,7 @@ def check_form(form):
if not form.validate():
_log.error("form validation failed for form %r", form)
for f in form:
- if len(f.error):
+ if len(f.errors):
_log.error("Errors for %s: %r", f.name, f.errors)
raise BadRequest()
dump = []
@@ -140,7 +140,7 @@ class PWGSession(object):
self.in_pwg_session = True
return self
- def __exit__(self, *args):
+ def __exit__(self, *args):
# Restore state
self.request.session = self.old_session
self.request.user = self.old_user
diff --git a/mediagoblin/tests/test_piwigo.py b/mediagoblin/tests/test_piwigo.py
index 18f95057..71d36ddb 100644
--- a/mediagoblin/tests/test_piwigo.py
+++ b/mediagoblin/tests/test_piwigo.py
@@ -56,7 +56,7 @@ class Test_PWG(object):
resp = self.do_post("pwg.session.login",
{"username": self.username, "password": self.password})
- assert resp.body == XML_PREFIX + '<rsp stat="ok">1</rsp>'
+ assert resp.body == XML_PREFIX + '<rsp stat="ok">1</rsp>'
resp = self.do_get("pwg.session.getStatus")
assert resp.body == XML_PREFIX \