From f9e34eff516825d37492df5f9518cf5e4cf48571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 16 Apr 2018 22:17:48 +0200 Subject: [PATCH] api/admin: fix volume info formatting Newline was put in a wrong place. Fixes QubesOS/qubes-issues#3831 --- qubes/api/admin.py | 2 +- qubes/tests/api_admin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qubes/api/admin.py b/qubes/api/admin.py index d9c8190e..a4a803c5 100644 --- a/qubes/api/admin.py +++ b/qubes/api/admin.py @@ -347,7 +347,7 @@ class QubesAdminAPI(qubes.api.AbstractQubesAPI): info = ''.join('{}={}\n'.format(key, _serialize(getattr(volume, key))) for key in volume_properties) try: - info += '\nis_outdated={}'.format(volume.is_outdated()) + info += 'is_outdated={}\n'.format(volume.is_outdated()) except NotImplementedError: pass return info diff --git a/qubes/tests/api_admin.py b/qubes/tests/api_admin.py index 76bcd19f..3d785ac4 100644 --- a/qubes/tests/api_admin.py +++ b/qubes/tests/api_admin.py @@ -363,7 +363,7 @@ class TC_00_VMs(AdminAPITestCase): b'private') self.assertEqual(value, ''.join('{p}={p}-value\n'.format(p=p) for p in volume_properties) + - '\nis_outdated=False') + 'is_outdated=False\n') self.assertEqual(self.vm.volumes.mock_calls, [unittest.mock.call.keys(), unittest.mock.call.__getattr__('__getitem__')('private'),