Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/pyinfra/operations/crontab.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ def comma_sep(value):
ctb = ctb0
name_comment = "# pyinfra-name={0}".format(cron_name)

existing_crontab = ctb.get_command(command=command, name=cron_name)
existing_crontab = ctb.get_command(
command=command if cron_name is None else None, name=cron_name
)
existing_crontab_command = existing_crontab["command"] if existing_crontab else command
existing_crontab_match = existing_crontab["command"] if existing_crontab else command

Expand Down
Loading