Merge pull request #50289 from gtmanfred/2018.3

ignore empty line in localectl status output
This commit is contained in:
Daniel Wallace 2018-10-29 16:39:06 -05:00 committed by GitHub
commit 935f1815a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -79,6 +79,8 @@ def _localectl_status():
ctl_key = ctl_key.strip().lower().replace(' ', '_')
else:
ctl_data = line.strip()
if not ctl_data:
continue
if ctl_key:
if '=' in ctl_data:
loc_set = ctl_data.split('=')

View file

@ -41,9 +41,11 @@ class LocalemodTestCase(TestCase, LoaderModuleMockMixin):
X11 Model: pc105
'''
locale_ctl_notset = '''
System Locale: n/a
System Locale: n/a
VC Keymap: n/a
X11 Layout: n/a
X11 Model: n/a
'''
locale_ctl_out_empty = ''
locale_ctl_out_broken = '''