cron: change identifier default value to False

this allows the user to set it explicitly to None if they want to
manage a cronjob with no identifier. realistically, this is probably
a rare usecase.
This commit is contained in:
Andreas Lutro 2015-08-12 09:11:59 +02:00
parent ad444b6e7b
commit f22ad837c3

View file

@ -216,7 +216,7 @@ def present(name,
month='*',
dayweek='*',
comment=None,
identifier=None):
identifier=False):
'''
Verifies that the specified cron job is present for the specified user.
For more advanced information about what exactly can be set in the cron
@ -256,7 +256,7 @@ def present(name,
edits. This defaults to the state id
'''
name = ' '.join(name.strip().split())
if not identifier:
if identifier is False:
identifier = name
ret = {'changes': {},
'comment': '',
@ -312,7 +312,7 @@ def present(name,
def absent(name,
user='root',
identifier=None,
identifier=False,
**kwargs):
'''
Verifies that the specified cron job is absent for the specified user; only
@ -334,7 +334,7 @@ def absent(name,
### of unsupported arguments will result in a traceback.
name = ' '.join(name.strip().split())
if not identifier:
if identifier is False:
identifier = name
ret = {'name': name,
'result': True,