Skip to content

Commit

Permalink
Cleaning code
Browse files Browse the repository at this point in the history
  • Loading branch information
geirawsm committed Jul 9, 2024
1 parent 5765b03 commit c3fa5b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sausage_bot/cogs/scrape_fcb_news.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async def barca_posting_stop(
)

# Tasks
@tasks.loop(minutes=int(config.env('FCB_LOOP', default=5)))
@tasks.loop(minutes=config.env.int('FCB_LOOP', default=5))
async def post_fcb_news():
'''
Post news from https://www.fcbarcelona.com to specific team channels
Expand Down
2 changes: 1 addition & 1 deletion sausage_bot/util/file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def file_exist(filename):
False
'''
try:
os.stat(filename, follow_symlinks=True)
os.stat(str(filename), follow_symlinks=True)
return True
except FileNotFoundError:
return False
Expand Down
10 changes: 5 additions & 5 deletions sausage_bot/util/log/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ def log_function(
print(log_out)
if extra_info:
log_out = '[ {} ] '.format(extra_info)
log_out += '[ {} ] '.format(function_name['line'])
log_out += '[ {} ] '.format(function_name['name'])
log_out += str(log_in)
else:
log_out += '[ {} ] '.format(function_name['line'])
log_out += '[ {} ] '.format(function_name['name'])
log_out += str(log_in)
if args.log_file:
dt = pendulum.now(config.TIMEZONE)
_dt_rev = dt.format('YYYY-MM-DD HH.mm.ss')
_dt_rev = dt.format('YYYY-MM-DD')
_logfilename = envs.LOG_DIR / f'{_dt_rev}.log'
write_log = open(_logfilename, 'a+', encoding="utf-8")
write_log.write(log_out)
Expand Down

0 comments on commit c3fa5b6

Please sign in to comment.