commit 5bc77346110d284f482df7429c3282a8989ee1bd
Author: Giorgos Korfiatis <gkorf@grnet.gr>
Date:   Tue Oct 15 18:03:06 2013 +0300

    astakos: pep8 fixes

diff --git a/snf-astakos-app/astakos/im/tests/auth.py b/snf-astakos-app/astakos/im/tests/auth.py
index 0137530..5ef24a1 100644
--- a/snf-astakos-app/astakos/im/tests/auth.py
+++ b/snf-astakos-app/astakos/im/tests/auth.py
@@ -256,7 +256,8 @@ class ShibbolethTests(TestCase):
         self.assertEqual(r.status_code, 200)
 
         # cannot add the same eppn
-        client.set_tokens(mail="secondary@shibboleth.gr", remote_user="kpapeppn",
+        client.set_tokens(mail="secondary@shibboleth.gr",
+                          remote_user="kpapeppn",
                           cn="Kostas Papadimitriou", )
         r = client.get(ui_url("login/shibboleth?"), follow=True)
         self.assertRedirects(r, ui_url('landing'))
@@ -264,7 +265,8 @@ class ShibbolethTests(TestCase):
         self.assertEquals(existing_user.auth_providers.count(), 2)
 
         # only one allowed by default
-        client.set_tokens(mail="secondary@shibboleth.gr", remote_user="kpapeppn2",
+        client.set_tokens(mail="secondary@shibboleth.gr",
+                          remote_user="kpapeppn2",
                           cn="Kostas Papadimitriou", ep_affiliation="affil2")
         prov = auth_providers.get_provider('shibboleth')
         r = client.get(ui_url("login/shibboleth?"), follow=True)
@@ -276,7 +278,8 @@ class ShibbolethTests(TestCase):
         client.reset_tokens()
 
         # cannot login with another eppn
-        client.set_tokens(mail="kpap@synnefo.org", remote_user="kpapeppninvalid",
+        client.set_tokens(mail="kpap@synnefo.org",
+                          remote_user="kpapeppninvalid",
                           cn="Kostas Papadimitriou")
         r = client.get(ui_url("login/shibboleth?"), follow=True)
         self.assertFalse(r.context['request'].user.is_authenticated())
@@ -352,7 +355,8 @@ class ShibbolethTests(TestCase):
         r = client.get(ui_url("login/shibboleth?"), follow=True)
         # try to assign existing shibboleth identifier of another user
         client.set_tokens(mail="kpap_second@shibboleth.gr",
-                          remote_user="existingeppn", cn="Kostas Papadimitriou")
+                          remote_user="existingeppn",
+                          cn="Kostas Papadimitriou")
         r = client.get(ui_url("login/shibboleth?"), follow=True)
         self.assertContains(r, "is already in use")
 
@@ -747,7 +751,6 @@ class TestAuthProviderViews(TestCase):
         eppn_user.add_auth_provider('shibboleth', 'EPPN')
         tid_user.add_auth_provider('shibboleth', TEST_TARGETED_ID1)
 
-
         get_user = lambda r: r.context['request'].user
 
         client = ShibbolethClient()
@@ -757,7 +760,6 @@ class TestAuthProviderViews(TestCase):
         self.assertEqual(eppn_user.get_auth_provider('shibboleth').identifier,
                          TEST_TARGETED_ID2)
 
-
         client = ShibbolethClient()
         client.set_tokens(eppn="EPPN", remote_user=TEST_TARGETED_ID1)
         r = client.get(ui_url('login/shibboleth?'), follow=True)
@@ -765,7 +767,6 @@ class TestAuthProviderViews(TestCase):
         self.assertEqual(tid_user.get_auth_provider('shibboleth').identifier,
                          TEST_TARGETED_ID1)
 
-
     @shibboleth_settings(CREATION_GROUPS_POLICY=['academic-login'],
                          AUTOMODERATE_POLICY=True)
     @im_settings(IM_MODULES=['shibboleth', 'local'], MODERATION_ENABLED=True,
@@ -796,7 +797,8 @@ class TestAuthProviderViews(TestCase):
 
         # new academic user
         self.assertFalse(academic_users.filter(email='newuser@synnefo.org'))
-        cl_newuser.set_tokens(remote_user="newusereppn", mail="newuser@synnefo.org",
+        cl_newuser.set_tokens(remote_user="newusereppn",
+                              mail="newuser@synnefo.org",
                               surname="Lastname")
         r = cl_newuser.get(ui_url('login/shibboleth?'), follow=True)
         initial = r.context['signup_form'].initial
diff --git a/snf-astakos-app/astakos/im/views/im.py b/snf-astakos-app/astakos/im/views/im.py
index da590fe..e0855e8 100644
--- a/snf-astakos-app/astakos/im/views/im.py
+++ b/snf-astakos-app/astakos/im/views/im.py
@@ -457,7 +457,6 @@ def signup(request, template_name='im/signup.html', on_success='index',
     form = activation_backend.get_signup_form(
         provider, None, **form_kwargs)
 
-
     if request.method == 'POST':
         form = activation_backend.get_signup_form(
             provider,
diff --git a/snf-astakos-app/astakos/im/views/target/shibboleth.py b/snf-astakos-app/astakos/im/views/target/shibboleth.py
index 9b33604..9ce3593 100644
--- a/snf-astakos-app/astakos/im/views/target/shibboleth.py
+++ b/snf-astakos-app/astakos/im/views/target/shibboleth.py
@@ -72,8 +72,8 @@ def migrate_eppn_to_remote_id(eppn, remote_id):
         pass
 
     pending_users = \
-            PendingThirdPartyUser.objects.filter(third_party_identifier=eppn,
-                                                 provider='shibboleth')
+        PendingThirdPartyUser.objects.filter(third_party_identifier=eppn,
+                                             provider='shibboleth')
 
     for pending in pending_users:
         msg = "Migrating pending user %s eppn (%s -> %s)"
@@ -153,7 +153,7 @@ def login(request,
         fullname = '%s %s' % (first_name, last_name)
 
         if not any([first_name, last_name]) and \
-                    settings.SHIBBOLETH_REQUIRE_NAME_INFO:
+                settings.SHIBBOLETH_REQUIRE_NAME_INFO:
             raise KeyError(_(astakos_messages.SHIBBOLETH_MISSING_NAME))
 
     except KeyError, e:
