mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fix python 2 unicode conversion
This commit is contained in:
parent
ec7195eeb3
commit
e6d76c5b58
1 changed files with 3 additions and 0 deletions
|
|
@ -22,6 +22,9 @@ def import_filepath(filepath, module_name=None):
|
|||
if module_name is None:
|
||||
module_name = os.path.splitext(os.path.basename(filepath))[0]
|
||||
|
||||
# Make sure it is not 'unicode' in Python 2
|
||||
module_name = str(module_name)
|
||||
|
||||
# Prepare module object where content of file will be parsed
|
||||
module = types.ModuleType(module_name)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue