mirror of
https://github.com/ethauvin/fail2ban-digest.git
synced 2025-04-27 03:08:12 -07:00
Fixed bug where db_creation_date_key was never found in the db keys.
This commit is contained in:
parent
39283554b6
commit
7152766ca1
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ def db_busy_open(filename, flags, timeout):
|
||||||
|
|
||||||
def add(db, ip):
|
def add(db, ip):
|
||||||
db = db_busy_open(db_location + '/' + db + '.dbm', 'c', 30)
|
db = db_busy_open(db_location + '/' + db + '.dbm', 'c', 30)
|
||||||
if db_creation_date_key not in db.keys():
|
if db_creation_date_key.encode('UTF-8') not in db.keys():
|
||||||
db[db_creation_date_key] = datetime.utcnow().strftime(db_date_format).encode('UTF-8')
|
db[db_creation_date_key] = datetime.utcnow().strftime(db_date_format).encode('UTF-8')
|
||||||
event_date = ('%s, ' % datetime.utcnow().strftime(db_date_format)).encode('UTF-8')
|
event_date = ('%s, ' % datetime.utcnow().strftime(db_date_format)).encode('UTF-8')
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue