Fix bootstrap.py on posix platform
This commit is contained in:
parent
80bea0766e
commit
70225009af
1 changed files with 5 additions and 1 deletions
|
@ -100,7 +100,11 @@ def create_chrome_version_h():
|
|||
version = f.read()
|
||||
with open(template_file, 'r') as f:
|
||||
template = f.read()
|
||||
with open(target_file, 'wb+') as f:
|
||||
if sys.platform in ['win32', 'cygwin']:
|
||||
open_mode = 'wb+'
|
||||
else:
|
||||
open_mode = 'w+'
|
||||
with open(target_file, open_mode) as f:
|
||||
content = template.replace('{PLACEHOLDER}', version.strip())
|
||||
if f.read() != content:
|
||||
f.write(content)
|
||||
|
|
Loading…
Reference in a new issue