fixed minor pylint -E errors
This commit is contained in:
+3
-3
@@ -225,8 +225,8 @@ def parsecronline(line):
|
|||||||
params = line.strip().split(None, 6)
|
params = line.strip().split(None, 6)
|
||||||
if len(params) < 7:
|
if len(params) < 7:
|
||||||
return None
|
return None
|
||||||
daysofweek = {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3, 'thu': 4,
|
daysofweek = {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3,
|
||||||
'fri': 5, 'sat': 6}
|
'thu': 4, 'fri': 5, 'sat': 6}
|
||||||
for (s, id) in zip(params[:5], ['min', 'hr', 'dom', 'mon', 'dow']):
|
for (s, id) in zip(params[:5], ['min', 'hr', 'dom', 'mon', 'dow']):
|
||||||
if not s in [None, '*']:
|
if not s in [None, '*']:
|
||||||
task[id] = []
|
task[id] = []
|
||||||
@@ -239,7 +239,7 @@ def parsecronline(line):
|
|||||||
elif val.isdigit() or val == '-1':
|
elif val.isdigit() or val == '-1':
|
||||||
task[id].append(int(val))
|
task[id].append(int(val))
|
||||||
elif id == 'dow' and val[:3].lower() in daysofweek:
|
elif id == 'dow' and val[:3].lower() in daysofweek:
|
||||||
task[id].append(daysofweek(val[:3].lower()))
|
task[id].append(daysofweek[val[:3].lower()])
|
||||||
task['user'] = params[5]
|
task['user'] = params[5]
|
||||||
task['cmd'] = params[6]
|
task['cmd'] = params[6]
|
||||||
return task
|
return task
|
||||||
|
|||||||
+4
-5
@@ -307,13 +307,13 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
has_futures = False
|
has_futures = False
|
||||||
|
|
||||||
class Future:
|
class Future(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class ThreadPoolExecutor:
|
class ThreadPoolExecutor(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class _WorkItem:
|
class _WorkItem(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@@ -784,8 +784,7 @@ class Rocket(object):
|
|||||||
the application developer. Please update your \
|
the application developer. Please update your \
|
||||||
applications to no longer call rocket.stop(True)"
|
applications to no longer call rocket.stop(True)"
|
||||||
try:
|
try:
|
||||||
import warnings
|
raise DeprecationWarning(msg)
|
||||||
raise warnings.DeprecationWarning(msg)
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise RuntimeError(msg)
|
raise RuntimeError(msg)
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -3152,7 +3152,9 @@ class SQLFORM(FORM):
|
|||||||
# if isinstance(linked_tables, dict):
|
# if isinstance(linked_tables, dict):
|
||||||
# linked_tables = linked_tables.get(table._tablename, [])
|
# linked_tables = linked_tables.get(table._tablename, [])
|
||||||
if linked_tables is None or referee in linked_tables:
|
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, cid=request.cid, _href=url(args=['view', referee, 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):
|
except (KeyError, ValueError, TypeError):
|
||||||
redirect(URL(args=table._tablename))
|
redirect(URL(args=table._tablename))
|
||||||
if nargs == len(args) + 1:
|
if nargs == len(args) + 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user