Patch ifupdown2 (#9630) (#11548)

This commit is contained in:
Tal Berlowitz 2022-09-26 19:30:38 +03:00 committed by GitHub
parent 2c10ebb4fe
commit 1b50a2b721
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,21 @@
Fix the return value of utils._execute_subprocess method for empty strings
---
ifupdown2/ifupdown/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ifupdown2/ifupdown/utils.py b/ifupdown2/ifupdown/utils.py
index d638fe9..0c5d8ce 100644
--- a/ifupdown2/ifupdown/utils.py
+++ b/ifupdown2/ifupdown/utils.py
@@ -380,7 +380,7 @@ class utils():
finally:
utils.disable_subprocess_signal_forwarding(signal.SIGINT)
- cmd_output_string = cmd_output.decode() if cmd_output else cmd_output
+ cmd_output_string = cmd_output.decode() if cmd_output is not None else cmd_output
if cmd_returncode != 0:
raise Exception(cls._format_error(cmd,
--
2.14.1

View File

@ -1,2 +1,3 @@
0001-fix-broadcast-addr-encoding.patch
0002-disable-checks-when-using-no-wait.patch
0003-Fix-the-return-value-of-utils._execute_subprocess-me.patch