summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-20 01:37:41 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-20 01:37:41 (GMT)
commitd9eacbb046154a04c1a32372d18b6d0614f2c7fe (patch)
treeb818caec0c0b979053e61636f329c8c8fabea912 /src
parent00d3efd103ce9bc00865517dac9b17275b3b8ab2 (diff)
downloadSCons-d9eacbb046154a04c1a32372d18b6d0614f2c7fe.zip
SCons-d9eacbb046154a04c1a32372d18b6d0614f2c7fe.tar.gz
SCons-d9eacbb046154a04c1a32372d18b6d0614f2c7fe.tar.bz2
Fix pickled/base64 string to be string instead of bytecode before writing to file py2/3
Diffstat (limited to 'src')
-rw-r--r--src/engine/SCons/Tool/msvs.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py
index 67f9ada..e1175e0 100644
--- a/src/engine/SCons/Tool/msvs.py
+++ b/src/engine/SCons/Tool/msvs.py
@@ -87,7 +87,7 @@ def _generateGUID(slnfile, name):
# Normalize the slnfile path to a Windows path (\ separators) so
# the generated file has a consistent GUID even if we generate
# it on a non-Windows platform.
- m.update(ntpath.normpath(str(slnfile)) + str(name))
+ m.update(bytearray(ntpath.normpath(str(slnfile)) + str(name),'utf-8'))
solution = m.hexdigest().upper()
# convert most of the signature to GUID form (discard the rest)
solution = "{" + solution[:8] + "-" + solution[8:12] + "-" + solution[12:16] + "-" + solution[16:20] + "-" + solution[20:32] + "}"
@@ -645,10 +645,10 @@ class _GenerateV6DSP(_DSPGenerator):
if self.nokeep == 0:
# now we pickle some data and add it to the file -- MSDEV will ignore it.
pdata = pickle.dumps(self.configs,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata)
+ pdata = base64.encodestring(pdata).decode()
self.file.write(pdata + '\n')
pdata = pickle.dumps(self.sources,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata)
+ pdata = base64.encodestring(pdata).decode()
self.file.write(pdata + '\n')
def PrintSourceFiles(self):
@@ -917,10 +917,10 @@ class _GenerateV7DSP(_DSPGenerator, _GenerateV7User):
if self.nokeep == 0:
# now we pickle some data and add it to the file -- MSDEV will ignore it.
pdata = pickle.dumps(self.configs,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata)
+ pdata = base64.encodestring(pdata).decode()
self.file.write('<!-- SCons Data:\n' + pdata + '\n')
pdata = pickle.dumps(self.sources,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata)
+ pdata = base64.encodestring(pdata).decode()
self.file.write(pdata + '-->\n')
def printSources(self, hierarchy, commonprefix):
@@ -1236,10 +1236,10 @@ class _GenerateV10DSP(_DSPGenerator, _GenerateV10User):
if self.nokeep == 0:
# now we pickle some data and add it to the file -- MSDEV will ignore it.
pdata = pickle.dumps(self.configs,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata)
+ pdata = base64.encodestring(pdata).decode()
self.file.write('<!-- SCons Data:\n' + pdata + '\n')
pdata = pickle.dumps(self.sources,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata)
+ pdata = base64.encodestring(pdata).decode()
self.file.write(pdata + '-->\n')
def printFilters(self, hierarchy, name):
@@ -1610,8 +1610,9 @@ class _GenerateV7DSW(_DSWGenerator):
self.file.write('EndGlobal\n')
if self.nokeep == 0:
pdata = pickle.dumps(self.configs,PICKLE_PROTOCOL)
- pdata = base64.encodestring(pdata)
- self.file.write(pdata + '\n')
+ pdata = base64.encodestring(pdata).decode()
+ self.file.write(pdata)
+ self.file.write('\n')
def Build(self):
try: