diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 37d6b370..3534249e 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -57,6 +57,7 @@ class Command(object): self.options() self.commonopts() (self.options, self.args) = self.parser.parse_args() + self.override_options() self.args.pop(0) # exclude command arg self.check_auth_info() @@ -78,7 +79,7 @@ class Command(object): default=True, help="show debugging information") p.add_option("-n", "--dry-run", action="store_true", default=False, help = "do not perform any action, just show what\ - would be done") + would be done") return p def options(self): @@ -86,6 +87,12 @@ class Command(object): options function it will be called""" pass + def override_options(self): + # if ignore_comar is not defined, it is True, where it is defined + # its default is False. Confused? Don't get confused, it's correct :) + if not hasattr(self.options, 'ignore_comar'): + self.options.ignore_comar = True + def check_auth_info(self): username = self.options.username password = self.options.password