From 151f1cd628f0b9152f3b6cf3e5e8afdea5583b5c Mon Sep 17 00:00:00 2001
From: Tim Jaacks <tim.jaacks@seco.com>
Date: Thu, 3 Aug 2023 10:36:59 +0200
Subject: [PATCH] Refactoring: remove redundant if

See for reference:
https://docs.sourcery.ai/Reference/Python/Default-Rules/remove-redundant-if/
---
 scripts/.sourcery.yaml   |  1 -
 scripts/gitlab_backup.py | 11 +++++------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/scripts/.sourcery.yaml b/scripts/.sourcery.yaml
index 424f2d5e..b5c068f1 100644
--- a/scripts/.sourcery.yaml
+++ b/scripts/.sourcery.yaml
@@ -15,7 +15,6 @@ rule_settings:
   - use-fstring-for-formatting
   - replace-interpolation-with-fstring
   - use-fstring-for-concatenation
-  - remove-redundant-if
   - low-code-quality
   - for-append-to-extend
   - raise-specific-error
diff --git a/scripts/gitlab_backup.py b/scripts/gitlab_backup.py
index 0a05b48c..4ff7f0c6 100755
--- a/scripts/gitlab_backup.py
+++ b/scripts/gitlab_backup.py
@@ -281,12 +281,11 @@ def main(args):
                     in_started_state += 1
                 continue
 
-            if status == "finished":
-                print("Downloading export for {}".format(project))
-                exportpath = p[project]["exportpath"]
-                with open(exportpath, "w+b") as f:
-                    f.write(export.download())
-                p[project]["downloaded"] = True
+            print("Downloading export for {}".format(project))
+            exportpath = p[project]["exportpath"]
+            with open(exportpath, "w+b") as f:
+                f.write(export.download())
+            p[project]["downloaded"] = True
         if in_started_state == 0:
             break
         print("Waiting for exports to be finished ({})".format(in_started_state))
-- 
GitLab