Skip to content

Commit e0f5bab

Browse files
committed
python3 windows fix
1 parent 1a90d45 commit e0f5bab

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

aaf/core.pyx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@ def register_all(path=None):
66
"""
77
Loads AAF dll and registers shared plugins.
88
"""
9+
10+
cdef bytes c_path
11+
912
if path:
10-
error_check(lib.AAFLoad(path))
13+
if isinstance(path, unicode):
14+
c_path = path.encode("ascii")
15+
else:
16+
c_path = path
17+
error_check(lib.AAFLoad(c_path))
1118
else:
1219
error_check(lib.AAFLoad(NULL))
1320

@@ -18,4 +25,4 @@ def register_all(path=None):
1825
error_check(plugin_manager.RegisterSharedPlugins())
1926
finally:
2027
if plugin_manager:
21-
plugin_manager.Release()
28+
plugin_manager.Release()

0 commit comments

Comments
 (0)