From 8d33e1a18830cc50badffaeef15eabdd8778432b Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 23 Jun 2020 04:16:40 -0500 Subject: [PATCH] added sqlite3 check for weird python setups --- src/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/__init__.py b/src/__init__.py index 8fd207cf..08275f20 100755 --- a/src/__init__.py +++ b/src/__init__.py @@ -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