mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Fix Duplicate encoding argument
on windows migration read
This commit is contained in:
parent
35334f010b
commit
39edd9c850
@ -392,11 +392,9 @@ class MigrationManager():
|
||||
"""
|
||||
Reads a migration from a file.
|
||||
"""
|
||||
call_params = {}
|
||||
if helper.is_os_windows() and sys.version_info >= (3, 0):
|
||||
# if system is windows - force utf-8 encoding
|
||||
call_params['encoding'] = 'utf-8'
|
||||
with open(os.path.join(helper.migration_dir, name + '.py'), **call_params, encoding='utf-8') as f:
|
||||
with open(os.path.join(helper.migration_dir, name + '.py'), encoding='utf-8') as f:
|
||||
code = f.read()
|
||||
scope = {}
|
||||
code = compile(code, '<string>', 'exec', dont_inherit=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user