fixed first log

This commit is contained in:
Kevin Froman 2019-02-12 22:37:08 -06:00
parent 59603deb6a
commit 1243b4aea7

View File

@ -134,8 +134,11 @@ def raw(data, fd = sys.stdout, sensitive = False):
if get_settings() & OUTPUT_TO_CONSOLE: if get_settings() & OUTPUT_TO_CONSOLE:
ts = fd.write('%s\n' % data) ts = fd.write('%s\n' % data)
if get_settings() & OUTPUT_TO_FILE and not sensitive: if get_settings() & OUTPUT_TO_FILE and not sensitive:
try:
if os.path.getsize(_outputfile) >= MAX_LOG_SIZE: if os.path.getsize(_outputfile) >= MAX_LOG_SIZE:
return return
except FileNotFoundError:
pass
try: try:
with open(_outputfile, "a+") as f: with open(_outputfile, "a+") as f:
f.write(colors.filter(data) + '\n') f.write(colors.filter(data) + '\n')