Skip to content

Commit

Permalink
don't fail if cli.command is None
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Aug 16, 2024
1 parent ccd089c commit 7e3f3c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extras/foreman_protector/dnf/foreman-protector.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _add_obsoletes(self):
return final_query

def sack(self):
if self.cli is not None and self.cli.command._basecmd not in PROTECT_COMMANDS:
if self.cli is not None and self.cli.command is not None and self.cli.command._basecmd not in PROTECT_COMMANDS:
return
if os.environ.get('LEAPP_IPU_IN_PROGRESS') is not None:
return
Expand Down

0 comments on commit 7e3f3c5

Please sign in to comment.