[Python-checkins] r64195 - python/trunk/Tools/msi/msilib.py

martin.v.loewis python-checkins at python.org
Thu Jun 12 22:06:18 CEST 2008


Author: martin.v.loewis
Date: Thu Jun 12 22:06:18 2008
New Revision: 64195

Log:
Support file names which include '+' (for Tk 8.5).

Modified:
   python/trunk/Tools/msi/msilib.py

Modified: python/trunk/Tools/msi/msilib.py
==============================================================================
--- python/trunk/Tools/msi/msilib.py	(original)
+++ python/trunk/Tools/msi/msilib.py	Thu Jun 12 22:06:18 2008
@@ -333,6 +333,7 @@
     #str = str.replace(".", "_") # colons are allowed
     str = str.replace(" ", "_")
     str = str.replace("-", "_")
+    str = str.replace("+", "_")
     if str[0] in string.digits:
         str = "_"+str
     assert re.match("^[A-Za-z_][A-Za-z0-9_.]*$", str), "FILE"+str
@@ -477,6 +478,7 @@
                         [(feature.id, component)])
 
     def make_short(self, file):
+        file = re.sub(r'[\?|><:/*"+,;=\[\]]', '_', file) # restrictions on short names
         parts = file.split(".")
         if len(parts)>1:
             suffix = parts[-1].upper()
@@ -505,7 +507,6 @@
                 if pos in (10, 100, 1000):
                     prefix = prefix[:-1]
         self.short_names.add(file)
-        assert not re.search(r'[\?|><:/*"+,;=\[\]]', file) # restrictions on short names
         return file
 
     def add_file(self, file, src=None, version=None, language=None):


More information about the Python-checkins mailing list