Created
May 2, 2024 17:22
-
-
Save r0x0d/45e346989d17de71a9c35c44febf3e66 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/convert2rhel/backup/packages.py b/convert2rhel/backup/packages.py | |
index 47f70c5b..df69b361 100644 | |
--- a/convert2rhel/backup/packages.py | |
+++ b/convert2rhel/backup/packages.py | |
@@ -136,10 +136,10 @@ class RestorablePackage(RestorableChange): | |
loggerinst.info("Backing up the packages: %s." % ",".join(self.pkgs)) | |
loggerinst.debug("Using repository files stored in %s." % self.reposdir) | |
- if self.reposdir: | |
+ if self.reposdir and os.path.exists(self.reposdir): | |
# If nothing is inside the directory, or it does not exist, let's | |
# just not use it to download the packages. | |
- if len(os.listdir(self.reposdir)) == 0 or not os.path.exists(self.reposdir): | |
+ if len(os.listdir(self.reposdir)) == 0: | |
loggerinst.info("The repository directory %s seems to be empty or non-existent.") | |
self.reposdir = None | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment