intel-screenbot

An Ingress Intel Map Bot for Hangoutsbot
git clone git://archive.git.mtrnord.blog/MTRNord/intel-screenbot.git
Log | Files | Refs | README | LICENSE

commit 27dc7ca805cf6772440e4fdf0a4a7e49090eb589
parent 587f8495266f0bedce1bf7fb8c49f1bf7fbd52b7
Author: Marcel <MTRNord@users.noreply.github.com>
Date:   Fri, 11 Nov 2016 20:37:16 +0100

Asyncio isn't able to run with try catch
Diffstat:
Mintel_screenbot/__init__.py | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/intel_screenbot/__init__.py b/intel_screenbot/__init__.py @@ -30,12 +30,7 @@ def _screencap(url, filename, SACSID, CSRF, search, bot, event): # make sure phantomjs has time to download/process the page # but if we get nothing after 30 sec, just move on loop = asyncio.get_event_loop() - try: - task = loop.create_task(stdout, _ = yield from process.communicate(timeout=30)) - except Exception as e: - logger.debug("Exception: {}".format(e)) - process.kill() - yield from process.wait() + task = loop.create_task(stdout, _ = yield from process.communicate(timeout=30)) exitcode = yield from process.wait() yield from loop.run_until_complete(task) # read the resulting file into a byte array