do not use a re object for a simple replace (make tmbinc happy)
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Mon, 9 Jan 2006 19:18:38 +0000 (19:18 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Mon, 9 Jan 2006 19:18:38 +0000 (19:18 +0000)
lib/python/Tools/Directories.py

index 7c89315..37ff1aa 100644 (file)
@@ -1,5 +1,4 @@
 import os
-from re import *
 
 SCOPE_TRANSPONDERDATA = 0
 SCOPE_SYSETC = 1
@@ -92,10 +91,7 @@ def getRecordingFilename(basename):
        non_allowed_characters = "/.\\"
        filename = ""
        
-       re = compile('\xc2\x86')
-       basename = re.sub('', basename)
-       re = compile('\xc2\x87')
-       basename = re.sub('', basename)
+       basename = basename.replace('\xc2\x86', '').replace('\xc2\x87', '')
        
        for c in basename:
                if c in non_allowed_characters: