try, except
This commit is contained in:
parent
bc4aa70651
commit
bf0ec3c3aa
@ -37,8 +37,11 @@ class Database(metaclass=SingletonMeta):
|
|||||||
# Enable autocommit so we don't have to call commit() after every transaction.
|
# Enable autocommit so we don't have to call commit() after every transaction.
|
||||||
self.connection.autocommit = True
|
self.connection.autocommit = True
|
||||||
|
|
||||||
|
try:
|
||||||
# Create a global database instance.
|
# Create a global database instance.
|
||||||
log_db = Database()
|
log_db = Database()
|
||||||
|
except:
|
||||||
|
print("No access to database. No logs available!!!")
|
||||||
|
|
||||||
def lookup_location(ip, reader):
|
def lookup_location(ip, reader):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user