X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=lcm%2Fosm_common%2Fmsglocal.py;h=a380e618da6565f5844a5020acc2080120cb025a;hb=refs%2Fchanges%2F40%2F5840%2F15;hp=5045181ff566bef8100c977adbc870cb5457aa31;hpb=0aef0dbb3c8b50426f31812e7f386dc9188823d2;p=osm%2FRO.git diff --git a/lcm/osm_common/msglocal.py b/lcm/osm_common/msglocal.py index 5045181f..a380e618 100644 --- a/lcm/osm_common/msglocal.py +++ b/lcm/osm_common/msglocal.py @@ -58,8 +58,10 @@ class msgLocal(MsgBase): except Exception as e: # TODO refine raise MsgException(str(e)) - async def aioread(self, loop, topic): + async def aioread(self, topic, loop=None): try: + if not loop: + loop = asyncio.get_event_loop() if topic not in self.files: self.files[topic] = open(self.path + topic, "r+") # ignore previous content