[asterisk-commits] kmoore: testsuite/asterisk/trunk r3115 - /asterisk/trunk/lib/python/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 21 10:56:01 CDT 2012
Author: kmoore
Date: Wed Mar 21 10:55:58 2012
New Revision: 3115
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3115
Log:
Prevent KeyError on no channels returned
This was not reproducible on my local system, but should correct the error as
displayed in the test logs.
Modified:
asterisk/trunk/lib/python/asterisk/SimpleTestCase.py
Modified: asterisk/trunk/lib/python/asterisk/SimpleTestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/SimpleTestCase.py?view=diff&rev=3115&r1=3114&r2=3115
==============================================================================
--- asterisk/trunk/lib/python/asterisk/SimpleTestCase.py (original)
+++ asterisk/trunk/lib/python/asterisk/SimpleTestCase.py Wed Mar 21 10:55:58 2012
@@ -51,8 +51,9 @@
def status_callback(self, result):
'''Initiate hangup since no more testing will take place'''
for status_result in result:
- self.ami[0].hangup(status_result['channel']).addCallbacks(
- self.hangup_success)
+ if 'channel' in status_result:
+ self.ami[0].hangup(status_result['channel']).addCallbacks(
+ self.hangup_success)
break
else:
# no channels to hang up? close it out
More information about the asterisk-commits
mailing list