Fix E713 with stricter pep8 error checker
authorSimo Sorce <simo@redhat.com>
Tue, 20 May 2014 19:25:29 +0000 (15:25 -0400)
committerSimo Sorce <simo@redhat.com>
Tue, 20 May 2014 19:31:08 +0000 (15:31 -0400)
Signed-off-by: Simo Sorce <simo@redhat.com>
ipsilon/helpers/ipa.py
ipsilon/login/authkrb.py
ipsilon/root.py
ipsilon/util/page.py

index 4948624..722b404 100755 (executable)
@@ -176,7 +176,7 @@ class Installer(object):
         self.get_keytab(opts)
 
         # Forcibly use krb then pam modules
         self.get_keytab(opts)
 
         # Forcibly use krb then pam modules
-        if not 'lm_order' in opts:
+        if 'lm_order' not in opts:
             opts['lm_order'] = []
         opts['krb'] = 'yes'
         if 'krb' not in opts['lm_order']:
             opts['lm_order'] = []
         opts['krb'] = 'yes'
         if 'krb' not in opts['lm_order']:
index 7132913..af659e7 100755 (executable)
@@ -52,7 +52,7 @@ class KrbError(LoginPageBase):
         # If we have no negotiate header return whatever mod_auth_kerb
         # generated and wait for the next request
 
         # If we have no negotiate header return whatever mod_auth_kerb
         # generated and wait for the next request
 
-        if not 'WWW-Authenticate' in cherrypy.request.headers:
+        if 'WWW-Authenticate' not in cherrypy.request.headers:
             cherrypy.response.status = 401
 
             if self.lm.next_login:
             cherrypy.response.status = 401
 
             if self.lm.next_login:
index 9451d22..c5fc5ae 100755 (executable)
@@ -33,7 +33,7 @@ sites = dict()
 class Root(Page):
 
     def __init__(self, site, template_env):
 class Root(Page):
 
     def __init__(self, site, template_env):
-        if not site in sites:
+        if site not in sites:
             sites[site] = dict()
         if template_env:
             sites[site]['template_env'] = template_env
             sites[site] = dict()
         if template_env:
             sites[site]['template_env'] = template_env
index 3a01811..1968009 100755 (executable)
@@ -38,7 +38,7 @@ def protect():
 
 class Page(object):
     def __init__(self, site, form=False):
 
 class Page(object):
     def __init__(self, site, form=False):
-        if not 'template_env' in site:
+        if 'template_env' not in site:
             raise ValueError('Missing template environment')
         self._site = site
         self.basepath = cherrypy.config.get('base.mount', "")
             raise ValueError('Missing template environment')
         self._site = site
         self.basepath = cherrypy.config.get('base.mount', "")