Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f623bee

Browse files
committed
fix: character issues
1 parent 0dc990b commit f623bee

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

lib/lokilogger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from logging import handlers
1515
import socket
1616

17-
__version__ = '0.51.0'
17+
__version__ = '0.51.1'
1818

1919

2020
# Logger Class -----------------------------------------------------------------

loki.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,15 +1342,16 @@ def script_stats_analysis(self, data):
13421342

13431343
# Check the characters
13441344
for char in c.most_common():
1345-
if char[0] in anomal_chars:
1346-
anomal_char_stats[char[0]] = char[1]
1347-
if char[0].isupper():
1345+
char_str = str(char[0])
1346+
if char_str in anomal_chars:
1347+
anomal_char_stats[char_str] = char[1]
1348+
if char_str.isupper():
13481349
char_stats["upper"] += char[1]
1349-
elif char[0].islower():
1350+
elif char_str.islower():
13501351
char_stats["lower"] += char[1]
1351-
elif char[0].isdigit():
1352+
elif char_str.isdigit():
13521353
char_stats["numbers"] += char[1]
1353-
elif char[0].isspace():
1354+
elif char_str.isspace():
13541355
char_stats["spaces"] += char[1]
13551356
else:
13561357
char_stats["symbols"] += char[1]

0 commit comments

Comments
 (0)