]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Simplify string cleansing in fallback update script
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>
Fri, 29 Apr 2016 01:47:13 +0000 (11:47 +1000)
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>
Fri, 29 Apr 2016 01:59:46 +0000 (11:59 +1000)
No behavioural change

scripts/maint/updateFallbackDirs.py

index c003a1b6a2ed39bb4480e29b701e1b59ca26e946..464d8476f07a0c6ece300354f76195e35b63ac94 100755 (executable)
@@ -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