From 33efa7ab7562248eb0140b9d47e57f44b87ce0da Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 25 Jul 2023 15:54:24 +0200 Subject: [PATCH] fix remove files --- ereuse_devicehub/commands/snapshots.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ereuse_devicehub/commands/snapshots.py b/ereuse_devicehub/commands/snapshots.py index 9bc74f32..8b4498cd 100644 --- a/ereuse_devicehub/commands/snapshots.py +++ b/ereuse_devicehub/commands/snapshots.py @@ -41,14 +41,13 @@ class UploadSnapshots: self.json_wb = None self.onlyfiles = [] - with self.app.app_context(): - self.get_user() - self.get_files() - for f in self.onlyfiles: - self.file_snapshot = f - self.open_snapshot() - self.build_snapshot() - self.remove_files() + self.get_user() + self.get_files() + for f in self.onlyfiles: + self.file_snapshot = f + self.open_snapshot() + self.build_snapshot() + self.remove_files() def get_user(self): """Get datamodel of user."""