Browse Source

Simplify string cleansing in fallback update script

No behavioural change
teor (Tim Wilson-Brown) 8 years ago
parent
commit
ab06b79cba
1 changed files with 1 additions and 2 deletions
  1. 1 2
      scripts/maint/updateFallbackDirs.py

+ 1 - 2
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