mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-20 02:09:24 +01:00
Simplify string cleansing in fallback update script
No behavioural change
This commit is contained in:
parent
d41f92b006
commit
ab06b79cba
@ -219,8 +219,7 @@ def cleanse_unprintable(raw_string):
|
||||
# Remove all unprintable characters
|
||||
cleansed_string = ''
|
||||
for c in raw_string:
|
||||
if (c in string.ascii_letters or c in string.digits
|
||||
or c in string.punctuation or c in string.whitespace):
|
||||
if c in string.printable:
|
||||
cleansed_string += c
|
||||
return cleansed_string
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user