Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort, and HTML digest. #3

Merged
merged 7 commits into from Mar 16, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/fail2ban_digest
Expand Up @@ -110,7 +110,7 @@ def db_busy_open(filename, flags, timeout):

def add(db, ip):
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():
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about adding "u" in front of the string at line # 37 instead?

db_creation_date_key = u'db_creation_date'

Should have the same effect should it not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should. I just made the change on my system and will let it run for a bit to double check. I'll update the PR if it works as it should.

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')
try:
Expand Down