[vlc-commits] Binding: fix winreg import for python3

Tomas Groth git at videolan.org
Wed Jun 25 13:49:33 CEST 2014


vlc/python | branch: master | Tomas Groth <tomasgroth at yahoo.dk> | Wed Jun 25 13:47:28 2014 +0200| [fc3f0907fe93180dd0de51c6ca7134d4b534e6a7] | committer: Olivier Aubert

Binding: fix winreg import for python3

Signed-off-by: Olivier Aubert <contact at olivieraubert.net>

> 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')



More information about the vlc-commits mailing list