git-svn-id: http://svn.brehm-online.com/svn/my-stuff/python/PyLogrotate/trunk@221
ec8d2aa5-1599-4edb-8739-
2b3a1bc399aa
'error',
)
+boolean_options = (
+ 'compress',
+ 'copytruncate',
+ 'ifempty',
+ 'missingok',
+ 'sharedscripts',
+)
+
#========================================================================
class LogrotateConfigurationError(Exception):
)
return True
+ # Check for boolean option
+ pattern = r'^(not?)?(' + '|'.join(boolean_options) + r')$'
+ match = re.search(pattern, option, re.IGNORECASE)
+ if match:
+ negated = match.group(1)
+ key = match.group(2).lower()
+ if self.verbose > 4:
+ pass
+ if negated is None:
+ option_value = True
+ else:
+ option_value = False
+
+
return True
#------------------------------------------------------------