From: Elrond Date: Sat, 18 May 2013 23:14:46 +0000 (+0200) Subject: A bit of pep8 and small typo fix. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d6c3375a781efd13a185b67e0f084c460c1e3cc6;p=mediagoblin.git A bit of pep8 and small typo fix. --- 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 + '1' + assert resp.body == XML_PREFIX + '1' resp = self.do_get("pwg.session.getStatus") assert resp.body == XML_PREFIX \