Commit Graph

8 Commits

Author SHA1 Message Date
Cole Robinson
4dfc6b03e8 hostkeymap: Fix sanitize_keymap on python3
And add test cases to cover the failure

https://bugzilla.redhat.com/show_bug.cgi?id=1585574
2018-06-12 14:07:50 -04:00
Daniel P. Berrangé
48e32b429d Fix copyright header to specify GPLv2 or later, not GPLv2 only.
The copyright headers in every file were chjanged in this previous commit

  commit b6dcee8eb7
  Author: Cole Robinson <crobinso@redhat.com>
  Date:   Tue Mar 20 15:00:02 2018 -0400

    Use consistent and minimal license header for every file

Where before this they said "

  "either version 2 of the License, or (at your option) any later version."

Now they just say

  "GNU GPLv2"

This fixes it to say "GNU GPLv2 or later" again.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-04 16:51:37 -04:00
Cole Robinson
b6dcee8eb7 Use consistent and minimal license header for every file 2018-03-21 07:29:40 -04:00
Chen Hanxiao
4897615a1e pylint: Replace deprecated assertEquals with assertEqual
pylint complain:
  Using deprecated method assertEquals() (deprecated-method)

https://docs.python.org/3.3/library/unittest.html#deprecated-aliases
Method Name     Deprecated alias        Deprecated alias
assertEqual()   failUnlessEqual         assertEquals

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-10-22 19:24:29 +08:00
Cole Robinson
e4aed23427 tests: Convert file()->open() usage
One snuck in recently
2017-10-20 16:13:04 -04:00
Cole Robinson
f0987ed9b8 tests: Add more hostkeymap tests 2017-10-18 18:42:50 -04:00
Jim Fehlig
9a9f9ecd2c virtinst: ignore comments in keymap conf files
On a host system with keyboard configured to en-US, it was noticed
that virt-install created install XML with keymap='de'. The host
system did not have /etc/vconsole.conf, so /etc/sysconfig/keyboard
was the next file to check, which contained the following

KEYTABLE=""

Currently the parsing code does not ignore comments and incorrectly
parsed a 'de' keymap. Fix by ignoring any lines that start with '#'
after trimming whitespace.
2017-10-18 17:46:41 -04:00
Cole Robinson
09a53eb2a3 tests: Add basic hostkeymap test
To validate an upcoming bugfix
2017-10-18 17:44:29 -04:00