- bsc#1074056 - [build 408.1]virt-install tool reports "TypeError:

must use keyword argument for key function" when parsing vnc
  virtinst-python2-to-python3-conversion.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=397
This commit is contained in:
Charles Arnold 2018-01-02 20:01:25 +00:00 committed by Git OBS Bridge
parent 4e6526bc59
commit 419a03b6b7
2 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Jan 2 12:45:56 MST 2018 - carnold@suse.com
- bsc#1074056 - [build 408.1]virt-install tool reports "TypeError:
must use keyword argument for key function" when parsing vnc
virtinst-python2-to-python3-conversion.patch
-------------------------------------------------------------------
Tue Jan 2 08:51:45 UTC 2018 - cbosdonnat@suse.com

View File

@ -34,12 +34,20 @@ Index: virt-manager-1.4.3/virtinst/hostkeymap.py
===================================================================
--- virt-manager-1.4.3.orig/virtinst/hostkeymap.py
+++ virt-manager-1.4.3/virtinst/hostkeymap.py
@@ -202,7 +202,7 @@ def sanitize_keymap(kt):
@@ -20,6 +20,7 @@
import logging
import os
import re
+import functools
_ETC_VCONSOLE = "/etc/vconsole.conf"
@@ -202,7 +203,7 @@ def sanitize_keymap(kt):
return len(b) - len(a)
clean_kt = kt.replace("-", "").replace("_", "")
- sorted_keys = sorted(keytable.keys(), len_cmp)
+ sorted_keys = sorted(list(keytable.keys()), len_cmp)
+ sorted_keys = sorted(list(keytable.keys()), key=functools.cmp_to_key(len_cmp))
for key in sorted_keys:
origkey = key