Skip to content

Commit 060828b

Browse files
Remove argument from future.close() call
Resolves #46
1 parent 957aa99 commit 060828b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/aiohttp_fetch.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,21 @@ async def on_btnFetch_clicked(self):
7373
async def main():
7474
def close_future(future, loop):
7575
loop.call_later(10, future.cancel)
76-
future.cancel("Close Application")
76+
future.cancel()
7777

7878
loop = asyncio.get_event_loop()
7979
future = asyncio.Future()
8080

8181
app = QApplication.instance()
82-
if hasattr(app, 'aboutToQuit'):
83-
getattr(app, 'aboutToQuit')\
84-
.connect(functools.partial(close_future, future, loop))
82+
if hasattr(app, "aboutToQuit"):
83+
getattr(app, "aboutToQuit").connect(
84+
functools.partial(close_future, future, loop)
85+
)
8586

8687
mainWindow = MainWindow()
8788
mainWindow.show()
8889

8990
await future
90-
9191
return True
9292

9393

0 commit comments

Comments
 (0)