diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2010-11-15 23:30:04 +0000 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2010-11-15 23:30:04 +0000 |
commit | daa9aa9bbe533caa806eb7717fb1943adc8605f8 (patch) | |
tree | 7ef8b8de99eb9734a646cbaf1119b3cb504b3a33 /pykolab/conf/__init__.py | |
parent | c9850853870b264384e3e075a59a5b3e3fcd6dad (diff) | |
download | pykolab-daa9aa9bbe533caa806eb7717fb1943adc8605f8.tar.gz |
Check for calendar/contacts/mail settings, and make sure the suites set them correctly, or bail out setting others if both a suite as well as one of the item types have been selected.
Diffstat (limited to 'pykolab/conf/__init__.py')
-rw-r--r-- | pykolab/conf/__init__.py | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/pykolab/conf/__init__.py b/pykolab/conf/__init__.py index dc4724b..fb37a8c 100644 --- a/pykolab/conf/__init__.py +++ b/pykolab/conf/__init__.py @@ -502,6 +502,36 @@ class Conf(object): # Get the suite's options, # Set them here. if "zpush" in value: - self.cli_options.__dict__['calendar'] = True - self.cli_options.__dict__['contacts'] = True + selectively = False + for item in [ 'calendar', 'contacts', 'mail' ]: + if self.cli_options.__dict__[item]: + self.log.debug(_("Found you specified a specific set of items to test: %s") %(item), level=9) + selectively = item + + if not selectively: + self.calendar = True + self.contacts = True + self.mail = True + else: + self.log.debug(_("Selectively selecting: %s") %(selectively), level=9) + setattr(self, selectively, True) + self.test_suites.append('zpush') + + def check_setting_calendar(self, value): + if self.parser._long_opt['--calendar'].default == value: + return False + else: + return True + + def check_setting_contacts(self, value): + if self.parser._long_opt['--contacts'].default == value: + return False + else: + return True + + def check_setting_mail(self, value): + if self.parser._long_opt['--mail'].default == value: + return False + else: + return True |