whee
parent
3ce6cc15b0
commit
8751a6fa00
|
@ -28,13 +28,11 @@ def guarded_mtime(path):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def modify_time(username):
|
def modify_time(username):
|
||||||
p(username)
|
|
||||||
files_to_mtimes = partial(map, guarded_mtime)
|
files_to_mtimes = partial(map, guarded_mtime)
|
||||||
return thread(username,
|
return thread(username,
|
||||||
username_to_html_path,
|
username_to_html_path,
|
||||||
bounded_find,
|
bounded_find,
|
||||||
files_to_mtimes,
|
files_to_mtimes,
|
||||||
p,
|
|
||||||
list,
|
list,
|
||||||
max)
|
max)
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
def slurp(file_path):
|
def slurp(file_path):
|
||||||
contents = None
|
contents = None
|
||||||
try:
|
try:
|
||||||
with open(file_path, 'r') as f:
|
with open(file_path, 'r', encoding="utf-8") as f:
|
||||||
contents = f.read()
|
contents = f.read()
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
|
except UnicodeDecodeError:
|
||||||
return contents
|
return contents
|
||||||
|
|
||||||
def thread(initial, *fns):
|
def thread(initial, *fns):
|
||||||
|
|
Reference in New Issue