Just a slight simplification, no functional change.

Signed-off-by: Ralf Ramsauer <[email protected]>
---
 pyjailhouse/config_parser.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pyjailhouse/config_parser.py b/pyjailhouse/config_parser.py
index ccb5aaac..6b9d9066 100644
--- a/pyjailhouse/config_parser.py
+++ b/pyjailhouse/config_parser.py
@@ -158,7 +158,7 @@ class CellConfig:
              self.cpu_reset_address) = \
                 struct.unpack_from(CellConfig._HEADER_FORMAT, self.data)
             if not root_cell:
-                if str(signature.decode()) != 'JHCELL':
+                if signature != b'JHCELL':
                     raise RuntimeError('Not a cell configuration')
                 if revision != _CONFIG_REVISION:
                     raise RuntimeError('Configuration file revision mismatch')
@@ -203,7 +203,7 @@ class SystemConfig:
              revision) = \
                 struct.unpack_from(SystemConfig._HEADER_FORMAT, self.data)
 
-            if str(signature.decode()) != 'JHSYST':
+            if signature != b'JHSYST':
                 raise RuntimeError('Not a root cell configuration')
             if revision != _CONFIG_REVISION:
                 raise RuntimeError('Configuration file revision mismatch')
-- 
2.27.0

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/20200607213226.861989-1-ralf.ramsauer%40oth-regensburg.de.

Reply via email to