From 29df16ecd3c0ec8d560cfb982d65788cf755688f Mon Sep 17 00:00:00 2001 From: xeals Date: Fri, 7 Apr 2023 10:13:11 +1000 Subject: [PATCH] fix move command --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index b858675..f80c165 100755 --- a/bot.py +++ b/bot.py @@ -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")