diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-12 17:52:28 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-12 17:52:28 +0200 |
commit | 81fada2b46636cbd118cc86ca85fa23966a4f88c (patch) | |
tree | b7466cd11e81e45289ba0b36f5c73281f19e1112 /engine/SCons/Tool/packaging/msi.py | |
parent | 2fb368b8751637ffa010e5e4f79e2dda6adc6038 (diff) | |
parent | 7cff8ecb55b0eee07bf8c52ec5b3ea5c156bcbad (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'engine/SCons/Tool/packaging/msi.py')
-rw-r--r-- | engine/SCons/Tool/packaging/msi.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/engine/SCons/Tool/packaging/msi.py b/engine/SCons/Tool/packaging/msi.py index 3f67d63..fbb8b21 100644 --- a/engine/SCons/Tool/packaging/msi.py +++ b/engine/SCons/Tool/packaging/msi.py @@ -4,7 +4,7 @@ The msi packager. """ # -# Copyright (c) 2001 - 2017 The SCons Foundation +# Copyright (c) 2001 - 2019 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -25,7 +25,7 @@ The msi packager. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/packaging/msi.py 74b2c53bc42290e911b334a6b44f187da698a668 2017/11/14 13:16:53 bdbaddog" +__revision__ = "src/engine/SCons/Tool/packaging/msi.py a56bbd8c09fb219ab8a9673330ffcd55279219d0 2019-03-26 23:16:31 bdeegan" import os import SCons @@ -63,8 +63,8 @@ def convert_to_id(s, id_set): """ charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYabcdefghijklmnopqrstuvwxyz0123456789_.' if s[0] in '0123456789.': - s += '_'+s - id = [c for c in s if c in charset] + s = '_' + s + id = ''.join([c for c in s if c in charset]) # did we already generate an id for this file? try: @@ -108,14 +108,13 @@ def gen_dos_short_file_name(file, filename_set): # strip forbidden characters. forbidden = '."/[]:;=, ' - fname = [c for c in fname if c not in forbidden] + fname = ''.join([c for c in fname if c not in forbidden]) # check if we already generated a filename with the same number: # thisis1.txt, thisis2.txt etc. duplicate, num = not None, 1 while duplicate: - shortname = "%s%s" % (fname[:8-len(str(num))].upper(),\ - str(num)) + shortname = "%s%s" % (fname[:8-len(str(num))].upper(), str(num)) if len(ext) >= 2: shortname = "%s%s" % (shortname, ext[:4].upper()) @@ -301,7 +300,7 @@ def build_wxsfile_file_section(root, files, NAME, VERSION, VENDOR, filename_set, if c.nodeName == 'Directory' and c.attributes['LongName'].value == escape(d)] - if already_created != []: + if already_created: Directory = already_created[0] dir_parts.remove(d) upper_dir += d |