[asterisk-dev] [Code Review] testsuite: don't pass strings to Deferred.errback()

wdoekes reviewboard at asterisk.org
Mon Mar 18 06:17:58 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2397/
-----------------------------------------------------------

Review request for Asterisk Developers.


Summary
-------

------------------------------------------------------------------------
r2361 | radix | 2002-08-11 02:37:02 +0200 (Sun, 11 Aug 2002) | 8 lines

Changes to Deferred and Failure to make deferred errbacks more consistent
 * Failure can now accept arbitrary objects as the `value', but
 * passing a string is depracated and will trigger a warning.
 * This changes the API slightly, as non-Failure objects passed to
   Deferred.errback will be embedded in a Failure before being passed to
   the errback chain.
 * Update tests to follow new API.

------------------------------------------------------------------------

Before:

[Mar 18 11:45:50] ERROR[2119]: asterisk:257 __wait_fully_booted_error: Asterisk core waitfullybooted for 127.0.0.1 failed
/usr/lib/python2.6/dist-packages/twisted/internet/defer.py:305: DeprecationWarning: Don't pass strings (like 'Command core waitfullybooted failed') to failure.Failure (replacing with a DefaultException).
  fail = failure.Failure(fail)
[Mar 18 11:45:50] ERROR[2119]: TestCase:251 __check_success_failure: [Failure instance: Traceback (failure with no frames): <class 'twisted.python.failure.DefaultException'>: Command core waitfullybooted failed
]

After:

[Mar 18 12:16:30] ERROR[6011]: asterisk:257 __wait_fully_booted_error: Asterisk core waitfullybooted for 127.0.0.1 failed
[Mar 18 12:16:30] ERROR[6011]: TestCase:251 __check_success_failure: Command core waitfullybooted failed


Diffs
-----

  /asterisk/trunk/lib/python/asterisk/TestCase.py 3668 
  /asterisk/trunk/lib/python/asterisk/asterisk.py 3668 

Diff: https://reviewboard.asterisk.org/r/2397/diff


Testing
-------


Thanks,

wdoekes

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130318/9f3118d7/attachment-0001.htm>


More information about the asterisk-dev mailing list