Remove unnecessary .absolute_path thanks to fspath.

master
voussoir 2021-12-07 12:45:32 -08:00
parent 6867d32798
commit b2abb29626
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 2 additions and 3 deletions

View File

@ -17,10 +17,9 @@ def upgrade_1_to_2(db):
cur = db.sql.cursor()
redmash_dir = db.index_dir.parent.with_child('redmash')
if redmash_dir.exists:
if not redmash_dir.is_dir:
raise Exception(f'{redmash_dir.absolute_path} is not a directory!')
redmash_dir.assert_is_directory()
print('Renaming redmash folder to index.')
os.rename(redmash_dir.absolute_path, db.index_dir.absolute_path)
os.rename(redmash_dir, db.index_dir)
def upgrade_all(database_filename):
'''