Guillaume Rousse wrote:
virtmanager split content of /etc/sysconfig/keyboard on '"' for
determining keyboard. On mandriva system, there isn't any quote in this
file: see http://qa.mandriva.com/show_bug.cgi?id=34190

Here is a patch making parsing of this file a bit more robust.

Patch forwarded to Fedora/Linux Management Tools <[EMAIL PROTECTED]> list.

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to