added sqlite3 check for weird python setups

master
Kevin 2020-06-23 04:16:40 -05:00
parent ca1f9eb44b
commit 8d33e1a188
1 changed files with 7 additions and 1 deletions

View File

@ -5,6 +5,13 @@ This file initializes Onionr when ran to be a daemon or with commands
Run with 'help' for usage.
"""
import sys
try:
import sqlite3
except ModuleNotFoundError:
sys.stderr.write(
'Error, Onionr requires Sqlite3-enabled Python.\n')
sys.exit(1)
"""
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -28,7 +35,6 @@ ran_as_script = False
if __name__ == "__main__": ran_as_script = True
# Import standard libraries
import sys # noqa
try:
from etc import dependencycheck # noqa