commented code, beautiful code
This commit is contained in:
parent
21bba13bc6
commit
6a44733d69
|
@ -704,9 +704,9 @@ def get_os_info():
|
|||
return 'N/A'
|
||||
|
||||
def sanitize_filename(filename):
|
||||
'''makes sure the filename we try to write does not contain
|
||||
unacceptable characters'''
|
||||
filename = punycode_encode(filename)
|
||||
'''makes sure the filename we will write does contain only
|
||||
acceptable and latin characters'''
|
||||
filename = punycode_encode(filename) # make it latin chars only
|
||||
filename = filename.replace('/', '_')
|
||||
if os.name == 'nt':
|
||||
filename = filename.replace('?', '').replace(':', '').replace('!', '')\
|
||||
|
|
Loading…
Reference in New Issue