mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-14 21:17:11 +00:00
sanitize filenames
This commit is contained in:
@@ -44,6 +44,11 @@ except:
|
||||
pass
|
||||
|
||||
|
||||
def sanitize_name(name):
|
||||
"""Filenames sould not caontain these characters as then the system barf when it tries to use them in URLs
|
||||
"""
|
||||
return name.replace("#","-").replace("?","=").replace("&","+").replace(":","^")
|
||||
|
||||
def get_process_memory():
|
||||
usage = resource.getrusage(resource.RUSAGE_SELF)
|
||||
return usage[2] / 1024.0
|
||||
|
||||
Reference in New Issue
Block a user