|
a/webui.py |
|
b/webui.py |
|
... |
|
... |
82 |
for value in ls:
|
82 |
for value in ls:
|
83 |
if value not in invalid:
|
83 |
if value not in invalid:
|
84 |
return value
|
84 |
return value
|
85 |
|
85 |
|
86 |
def timestr(secs, fmt):
|
86 |
def timestr(secs, fmt):
|
|
|
87 |
if secs == '' or secs is None:
|
|
|
88 |
secs = '0'
|
87 |
t = time.gmtime(int(secs))
|
89 |
t = time.gmtime(int(secs))
|
88 |
return time.strftime(fmt, t)
|
90 |
return time.strftime(fmt, t)
|
89 |
|
91 |
|
90 |
def normalise_filename(fn):
|
92 |
def normalise_filename(fn):
|
91 |
valid_chars = "_-%s%s" % (string.ascii_letters, string.digits)
|
93 |
valid_chars = "_-%s%s" % (string.ascii_letters, string.digits)
|