isra17 / autobahn-autoreconnect

Python Autobahn runner with auto-reconnect feature
GNU General Public License v2.0
19 stars 10 forks source link

SyntaxError: invalid syntax on __init__.py #16

Open VitorHugoAguiar opened 7 years ago

VitorHugoAguiar commented 7 years ago

Hi

I am getting the following error:

from autobahn_autoreconnect import ApplicationRunner

File "/usr/local/lib/python2.7/dist-packages/autobahnautoreconnect/init.py", line 195 , protocol = yield from self._loop.create_connection(self._transport_factory, self._host, self._port, ssl=self._ssl) SyntaxError: invalid syntax

Any idea why?

isra17 commented 7 years ago

yield from was introduce with Python 3.3, I don't think this code have been tested with Python 2.7. Lack of unit testing make it a pain to test on anything else than latest Python release. Feel free to fix it (yield from is easy to convert with a for loop + yield, I can't tell if there's anything else to fix though).