[Asterisk-code-review] testsuite: avoid hang on waitfullybooted (testsuite[18])

Friendly Automation asteriskteam at digium.com
Thu Sep 8 11:37:58 CDT 2022


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/testsuite/+/19132 )

Change subject: testsuite: avoid hang on waitfullybooted
......................................................................

testsuite: avoid hang on waitfullybooted

Python 3.6 compatibility change

ASTERISK-30208

Change-Id: Ieba157910e9c7422f3c54f4d31a89a4e99ec3c84
(cherry picked from commit a43658375c8d3c7994ecff39c870e44f31b6331c)
---
M lib/python/asterisk/asterisk.py
1 file changed, 17 insertions(+), 1 deletion(-)

Approvals:
  Friendly Automation: Looks good to me, approved; Approved for Submit




diff --git a/lib/python/asterisk/asterisk.py b/lib/python/asterisk/asterisk.py
index 66c1124..1c0edfd 100644
--- a/lib/python/asterisk/asterisk.py
+++ b/lib/python/asterisk/asterisk.py
@@ -23,6 +23,8 @@
 
 from .config import ConfigFile
 
+from subprocess import PIPE
+
 from twisted.internet import reactor, protocol, defer, utils, error
 from twisted.python.failure import Failure
 
@@ -963,7 +965,7 @@
             completed = subprocess.run([self.ast_binary,
                 "-C", "%s" % os.path.join(self.astetcdir, "asterisk.conf"),
                 "-rx", "%s" % cli_cmd],
-                capture_output=True, encoding='utf-8')
+                stdout=PIPE, stderr=PIPE, encoding='utf-8')
 
             if responsekey not in completed.stdout:
                 CLIRetVal = 2

-- 
To view, visit https://gerrit.asterisk.org/c/testsuite/+/19132
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: 18
Gerrit-Change-Id: Ieba157910e9c7422f3c54f4d31a89a4e99ec3c84
Gerrit-Change-Number: 19132
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-CC: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220908/9f9fca8b/attachment.html>


More information about the asterisk-code-review mailing list