py-asterisk icon indicating copy to clipboard operation
py-asterisk copied to clipboard

python 3.7 support - 'async' is a reserved keyword in python 3.7

Open Briareos12 opened this issue 7 years ago • 1 comments

Hello,

Into your originate function, you used async keyword parameter which is used into data variable.

For that case I think _aysnc would be appropriate.

Actual Result :

ERROR! Unexpected Exception, this is probably a bug: invalid syntax

How to resolve :

def Originate(self, channel, context=None, extension=None, priority=None, application=None, data=None, timeout=None, caller_id=None, variable=None, account=None, async=None, early_media=None, codecs=None, channel_id=None, other_channel_id=None)

To

def Originate(self, channel, context=None, extension=None, priority=None, application=None, data=None, timeout=None, caller_id=None, variable=None, account=None, _async=None, early_media=None, codecs=None, channel_id=None, other_channel_id=None)

Do not forget to modify var 'data' :)

Briareos12 avatar Jul 14 '19 16:07 Briareos12

Fixed by Mikhail Yuldashev.

jeansch avatar Mar 03 '22 16:03 jeansch