fix move command

This commit is contained in:
xeals 2023-04-07 10:13:11 +10:00
parent c3df316aa4
commit 132096b427
Signed by: xeals
GPG Key ID: A498C7AF27EC6B5C

4
bot.py
View File

@ -4,8 +4,8 @@ from discord.utils import setup_logging
import argparse
import discord
import logging
import os
import re
import shutil
import subprocess as sp
discord.utils.setup_logging()
@ -32,7 +32,7 @@ def _update_db():
for line in f:
games.append(line.strip())
sp.run(["./index.py", "-o", _DB] + games)
os.rename(_DB, _DB_DEST)
shutil.move(_DB, _DB_DEST)
except:
_log.exception(f"failed updating db")