diff options
author | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-04-29 11:47:13 +1000 |
---|---|---|
committer | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-04-29 11:59:46 +1000 |
commit | ab06b79cba4b8eebec7afee680bc0f72a72aaf4a (patch) | |
tree | b711e82102973655f89f22cb433d80aedd2151f7 /scripts | |
parent | d41f92b00655197463ed26c0854113ef5c1b6707 (diff) | |
download | tor-ab06b79cba4b8eebec7afee680bc0f72a72aaf4a.tar.gz tor-ab06b79cba4b8eebec7afee680bc0f72a72aaf4a.zip |
Simplify string cleansing in fallback update script
No behavioural change
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/maint/updateFallbackDirs.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/maint/updateFallbackDirs.py b/scripts/maint/updateFallbackDirs.py index c003a1b6a2..464d8476f0 100755 --- a/scripts/maint/updateFallbackDirs.py +++ b/scripts/maint/updateFallbackDirs.py @@ -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 |