commit ab06b79cba4b8eebec7afee680bc0f72a72aaf4a Author: teor (Tim Wilson-Brown) teor2345@gmail.com Date: Fri Apr 29 11:47:13 2016 +1000
Simplify string cleansing in fallback update script
No behavioural change --- scripts/maint/updateFallbackDirs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/maint/updateFallbackDirs.py b/scripts/maint/updateFallbackDirs.py index c003a1b..464d847 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
tor-commits@lists.torproject.org