fixed use of whitespaces

This commit is contained in:
mdipierro
2017-08-01 10:26:33 -05:00
parent 7088b74d42
commit 213c4ee7d1
6 changed files with 16 additions and 16 deletions
+5 -5
View File
@@ -20,10 +20,10 @@ DEFAULT = lambda: None
class AuthAPI(object):
"""
AuthAPI is a barebones Auth implementation which does not have a concept of
HTML forms or redirects, emailing or even an URL, you are responsible for
HTML forms or redirects, emailing or even an URL, you are responsible for
all that if you use it.
The main Auth functions such as login, logout, register, profile are designed
in a Dict In -> Dict Out logic so, for instance, if you set
in a Dict In -> Dict Out logic so, for instance, if you set
registration_requires_verification you are responsible for sending the key to
the user and even rolling back the transaction if you can't do it.
@@ -245,13 +245,13 @@ class AuthAPI(object):
migrate = db._migrate
if fake_migrate is None:
fake_migrate = db._fake_migrate
settings = self.settings
if username is None:
username = settings.use_username
else:
settings.use_username = username
if not self.signature:
self.define_signature()
if signature is True:
@@ -1012,7 +1012,7 @@ class AuthAPI(object):
):
"""
Verify a given registration_key actually exists in the user table.
Resets the key to empty string '' or 'pending' if
Resets the key to empty string '' or 'pending' if
setttings.registration_requires_approval is true.
Keyword Args:
+1 -1
View File
@@ -225,7 +225,7 @@ def parsecronline(line):
params = line.strip().split(None, 6)
if len(params) < 7:
return None
daysofweek = {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3,
daysofweek = {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3,
'thu': 4, 'fri': 5, 'sat': 6}
for (s, id) in zip(params[:5], ['min', 'hr', 'dom', 'mon', 'dow']):
if not s in [None, '*']:
+4 -4
View File
@@ -1922,8 +1922,8 @@ class SQLFORM(FORM):
del attributes['table_name']
# Clone fields, while passing tables straight through
fields_with_clones = [f.clone() if isinstance(f, Field) else f for f in fields]
fields_with_clones = [f.clone() if isinstance(f, Field) else f for f in fields]
return SQLFORM(DAL(None).define_table(table_name, *fields_with_clones), **attributes)
@staticmethod
@@ -3161,8 +3161,8 @@ class SQLFORM(FORM):
# if isinstance(linked_tables, dict):
# linked_tables = linked_tables.get(table._tablename, [])
if linked_tables is None or referee in linked_tables:
field.represent = (lambda id, r=None, referee=referee, rep=field.represent:
A(callable(rep) and rep(id) or id,
field.represent = (lambda id, r=None, referee=referee, rep=field.represent:
A(callable(rep) and rep(id) or id,
cid=request.cid, _href=url(args=['view', referee, id])))
except (KeyError, ValueError, TypeError):
redirect(URL(args=table._tablename))
+3 -3
View File
@@ -1792,7 +1792,7 @@ class Auth(AuthAPI):
servicevalidate='serviceValidate',
proxyvalidate='proxyValidate',
logout='logout'),
cas_create_user=True,
cas_create_user=True,
extra_fields={},
actions_disabled=[],
controller=controller,
@@ -2285,7 +2285,7 @@ class Auth(AuthAPI):
If the user doesn't yet exist, then they are created.
"""
table_user = self.table_user()
create_user = self.settings.cas_create_user
create_user = self.settings.cas_create_user
user = None
checks = []
# make a guess about who this user is
@@ -2318,7 +2318,7 @@ class Auth(AuthAPI):
update_keys[key] = keys[key]
user.update_record(**update_keys)
elif checks:
if create_user is False:
if create_user is False:
# Remove current open session a send message
self.logout(next=None, onlogout=None, log=None)
raise HTTP(403, "Forbidden. User need to be created first.")
+2 -2
View File
@@ -140,7 +140,7 @@ class web2pyDialog(object):
else:
import tkinter
from tkinter import messagebox
bg_color = 'white'
root.withdraw()
@@ -463,7 +463,7 @@ class web2pyDialog(object):
import tkMessageBox as messagebox
else:
from tkinter import messagebox
messagebox.showerror('web2py start server', message)
def start(self):