File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 19
19
- ' 3.8'
20
20
- ' 3.9'
21
21
- ' 3.10'
22
- runs-on : ubuntu-latest
22
+ runs-on : ubuntu-22.04
23
23
steps :
24
24
- uses : actions/checkout@v3
25
25
with :
Original file line number Diff line number Diff line change
1
+ import asyncio
1
2
import logging
2
3
import os
3
4
import signal
8
9
from cloudbot .bot import CloudBot
9
10
from cloudbot .util import async_util
10
11
11
-
12
- def main ():
12
+ async def async_main ():
13
13
# store the original working directory, for use when restarting
14
14
original_wd = Path ().resolve ()
15
15
@@ -84,5 +84,9 @@ def exit_gracefully(signum, frame):
84
84
logging .shutdown ()
85
85
86
86
87
+ def main ():
88
+ asyncio .run (async_main ())
89
+
90
+
87
91
if __name__ == "__main__" :
88
92
main ()
Original file line number Diff line number Diff line change 1
- import asyncio
2
1
import logging
3
2
from typing import Awaitable , Dict , Optional
4
3
7
6
from cloudbot .bot import CloudBot
8
7
from cloudbot .client import Client
9
8
from cloudbot .plugin import PluginManager
9
+ from cloudbot .util .async_util import create_future
10
10
from tests .util .mock_config import MockConfig
11
11
from tests .util .mock_db import MockDB
12
12
@@ -26,7 +26,7 @@ def __init__(
26
26
self .data_path = self .base_dir / "data"
27
27
self .data_dir = str (self .data_path )
28
28
self .plugin_dir = self .base_dir / "plugins"
29
- self .stopped_future : Awaitable [bool ] = asyncio . Future ()
29
+ self .stopped_future : Awaitable [bool ] = create_future ()
30
30
31
31
if db :
32
32
self .db_engine = db .engine
You can’t perform that action at this time.
0 commit comments