Skip to content

Commit 5014bf9

Browse files
fix(operations/crontab): lint + remove list comprehension from inline if
1 parent 373ff53 commit 5014bf9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyinfra/operations/crontab.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def comma_sep(value):
8484
ctb = ctb0
8585
name_comment = "# pyinfra-name={0}".format(cron_name)
8686

87-
existing_crontab = ctb.get_command(command=[command if cron_name is None else None], name=cron_name)
87+
existing_crontab = ctb.get_command(
88+
command=command if cron_name is None else None, name=cron_name
89+
)
8890
existing_crontab_command = existing_crontab["command"] if existing_crontab else command
8991
existing_crontab_match = existing_crontab["command"] if existing_crontab else command
9092

0 commit comments

Comments
 (0)