summaryrefslogtreecommitdiff
path: root/trollius/events.py
diff options
context:
space:
mode:
Diffstat (limited to 'trollius/events.py')
-rw-r--r--trollius/events.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/trollius/events.py b/trollius/events.py
index 7fa658d..131399b 100644
--- a/trollius/events.py
+++ b/trollius/events.py
@@ -19,7 +19,9 @@ import sys
from trollius import compat
try:
import asyncio
-except ImportError:
+except (ImportError, SyntaxError):
+ # ignore SyntaxError for convenience: ignore SyntaxError caused by "yield
+ # from" if asyncio module is in the Python path
asyncio = None