vlc/python | branch: master | Tomas Groth <[email protected]> | Wed Jun 25 13:47:28 2014 +0200| [fc3f0907fe93180dd0de51c6ca7134d4b534e6a7] | committer: Olivier Aubert
Binding: fix winreg import for python3 Signed-off-by: Olivier Aubert <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=fc3f0907fe93180dd0de51c6ca7134d4b534e6a7 --- header.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/header.py b/header.py index 4f2ed05..c97c517 100755 --- a/header.py +++ b/header.py @@ -109,7 +109,11 @@ def find_lib(): p = find_library('libvlc.dll') if p is None: try: # some registry settings - import _winreg as w # leaner than win32api, win32con + # leaner than win32api, win32con + if PYTHON3: + import winreg as w + else: + import _winreg as w for r in w.HKEY_LOCAL_MACHINE, w.HKEY_CURRENT_USER: try: r = w.OpenKey(r, 'Software\\VideoLAN\\VLC') _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
