[asterisk-dev] [Code Review] New asterisk.Asterisk.cli_originate function

Russell Bryant russell at digium.com
Tue Jul 27 12:56:15 CDT 2010


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



/asterisk/trunk/lib/python/asterisk/asterisk.py
<https://reviewboard.asterisk.org/r/806/#comment5462>

    don't need re anymore



/asterisk/trunk/lib/python/asterisk/asterisk.py
<https://reviewboard.asterisk.org/r/806/#comment5463>

    s/raiseError/raise_error/



/asterisk/trunk/lib/python/asterisk/asterisk.py
<https://reviewboard.asterisk.org/r/806/#comment5464>

    I think you could collapse this down to a single if/else:
    
    if self.ast_version < AsteriskVersion("1.6.2"):
        self.cli_exec("originate %s" % argstr, blocking=blocking)
    else:
        self.cli_exec("channel originate %s" % argstr, blocking=blocking)


- Russell


On 2010-07-27 11:48:37, Erin Spiceland wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/806/
> -----------------------------------------------------------
> 
> (Updated 2010-07-27 11:48:37)
> 
> 
> Review request for Asterisk Developers and Russell Bryant.
> 
> 
> Summary
> -------
> 
> New cli_originate() function, because I keep rewriting code to check Asterisk version.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/lib/python/asterisk/asterisk.py 584 
> 
> Diff: https://reviewboard.asterisk.org/r/806/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Erin
> 
>




More information about the asterisk-dev mailing list