2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-12 10:05:39 +00:00

PEP fixes for ci / maintenance scripts

This commit is contained in:
Matthias
2021-11-19 21:50:41 +01:00
parent 4e113798b4
commit 9abbb6cb5e
4 changed files with 11 additions and 8 deletions

View File

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
from shutil import copyfile
import os
import json
import sys
@ -134,6 +133,7 @@ def rebuild_models(c):
manage(c, "rebuild_models", pty=True)
@task
def rebuild_thumbnails(c):
"""
@ -142,6 +142,7 @@ def rebuild_thumbnails(c):
manage(c, "rebuild_thumbnails", pty=True)
@task
def clean_settings(c):
"""
@ -150,6 +151,7 @@ def clean_settings(c):
manage(c, "clean_settings")
@task(post=[rebuild_models, rebuild_thumbnails])
def migrate(c):
"""
@ -306,7 +308,7 @@ def export_records(c, filename='data.json'):
# Get an absolute path to the file
if not os.path.isabs(filename):
filename = os.path.join(localDir(), filename)
filename = os.path.abspath(filename)
filename = os.path.abspath(filename)
print(f"Exporting database records to file '{filename}'")