Sophie

Sophie

distrib > Mandriva > 2008.0 > x86_64 > by-pkgid > 965b57e252373783683a2f2872b66864 > files > 1

virt-manager-0.5.0-6mdv2008.0.src.rpm

diff -Naur virt-manager-0.5.0/src/virtManager/create.py virt-manager-0.5.0.keyboard/src/virtManager/create.py
--- virt-manager-0.5.0/src/virtManager/create.py	2007-08-29 23:09:47.000000000 +0200
+++ virt-manager-0.5.0.keyboard/src/virtManager/create.py	2007-09-27 14:14:56.000000000 +0200
@@ -540,7 +540,12 @@
                 if s == "":
                     break
                 if re.search("KEYTABLE", s) != None:
-                    kt = s.split('"')[1]
+                    kt = s.split('=')[1]
+		    # take care of potential quotes
+		    p = re.compile('["\']([-\w]+)["\']')
+		    m = p.match(kt)
+		    if m:
+		        kt = m.group(1)
                     if keytable.keytable.has_key(kt):
                         keymap = keytable.keytable[kt]
             f.close