From 1614fd6eb2e6f74bd67fcad3e2e9a15c8a41dd2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kierski?= Date: Wed, 20 Feb 2019 16:41:44 +0100 Subject: [PATCH] Fix end of stream detecting --- galaxy/api/jsonrpc.py | 10 ++++++---- setup.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/galaxy/api/jsonrpc.py b/galaxy/api/jsonrpc.py index d9df245..6e431da 100644 --- a/galaxy/api/jsonrpc.py +++ b/galaxy/api/jsonrpc.py @@ -64,10 +64,12 @@ class Server(): async def run(self): while self._active: - data = await self._reader.readline() - if not data: - # on windows rederecting a pipe to stdin result on continues - # not-blocking return of empty line on EOF + try: + data = await self._reader.readline() + if not data: + self._eof() + continue + except: self._eof() continue data = data.strip() diff --git a/setup.py b/setup.py index 057c8b5..073b615 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name="galaxy.plugin.api", - version="0.5", + version="0.6", description="Galaxy python plugin API", author='Galaxy team', author_email='galaxy@gog.com',