File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def __init__(self):
47
47
'password' : self .cf .get ('database' , 'password' )
48
48
}
49
49
else :
50
- import wfewfwefg
50
+ import sqlite3
51
51
self .DB_PARAMS = {}
52
52
if not self .DB_NAME .endswith ('.db' ):
53
53
self .DB_NAME += '.db'
@@ -81,7 +81,11 @@ def __init__(self):
81
81
exit ()
82
82
except ImportError as e :
83
83
logger .error ("依赖包缺少: %r" % e .name )
84
- logger .error ("请尝试运行 'pip install %s' 安装该依赖包后重新启动!" % e .name )
84
+ if e .name == 'pymysql' :
85
+ cmd = 'pip install pymysql'
86
+ else :
87
+ cmd = 'pip install pysqlite3'
88
+ logger .error ("请尝试运行 '%s' 安装该依赖包后重新启动!" % cmd )
85
89
exit ()
86
90
87
91
def change_debug (self ):
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ COPY Madoka .
11
11
12
12
RUN apt-get update && apt-get install git -y && \
13
13
apt-get autoclean && rm -rf /var/lib/apt/lists/* && \
14
- pip install -r requirements.txt
14
+ pip install -r requirements.txt && \
15
+ pip install pymysql pysqlite3
15
16
16
17
CMD ["/bin/bash" , "-c" , "python main.py" ]
You can’t perform that action at this time.
0 commit comments