def import_ctf(path, delete_import_on_finish=False): with app.app_context(): import_ctf_util(path) if delete_import_on_finish: print(f"Deleting {path}") Path(path).unlink()
def import_ctf(): backup = request.files['backup'] errors = get_errors() try: import_ctf_util(backup) except Exception as e: print(e) errors.append(repr(e)) if errors: return errors[0], 500 else: return redirect(url_for('admin.config'))
def import_ctf(path): with app.app_context(): import_ctf_util(path)