Skip to content

Commit 7a375d0

Browse files
authored
operations/crontab: replace print with logger.debug
1 parent 6714ee9 commit 7a375d0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pyinfra/operations/crontab.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
import shlex
44

5-
from pyinfra import host
6-
from pyinfra.api import StringCommand, operation
5+
from pyinfra import logger
6+
from pyinfra.api.command import StringCommand
7+
from pyinfra.api.operation import operation
78
from pyinfra.api.util import try_int
9+
from pyinfra.context import host
810
from pyinfra.facts.crontab import Crontab, CrontabFile
911
from pyinfra.operations.util.files import sed_delete, sed_replace
1012

@@ -121,7 +123,7 @@ def comma_sep(value):
121123

122124
# Want the cron but it doesn't exist? Append the line
123125
elif present and not exists:
124-
print("present", present, "exists", exists)
126+
logger.debug(f"present: {present}, exists: {exists}")
125127
if ctb: # append a blank line if cron entries already exist
126128
edit_commands.append("echo '' >> {0}".format(temp_filename))
127129
if cron_name:

0 commit comments

Comments
 (0)