Skip to content

Commit

Permalink
Update v1.0.1 (121023-1019)
Browse files Browse the repository at this point in the history
1. Fixed UnboundLocalError
  • Loading branch information
rzc0d3r authored Oct 12, 2023
1 parent ad7b70b commit 83f6c52
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Version 1.0 (101023-1624)
# Version 1.0.1 (121023-1019)
from colorama import Fore, Style, init

init()
Expand All @@ -21,15 +21,17 @@ def data(self):

def console_log(text='', logger_type=None, fill_text=None):
if isinstance(logger_type, LoggerType):
ni = 0
for i in range(0, len(text)):
if text[i] != '\n':
ni = i
break
print()
if logger_type.fill_text and fill_text is None:
fill_text = True
if logger_type.fill_text and fill_text:
print(logger_type.data + ' ' + logger_type.color + text[i:] + Style.RESET_ALL)
print(logger_type.data + ' ' + logger_type.color + text[ni:] + Style.RESET_ALL)
else:
print(logger_type.data + ' ' + text[i:])
print(logger_type.data + ' ' + text[ni:])
else:
print(text)

0 comments on commit 83f6c52

Please sign in to comment.