Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the decode error bug if the job params has no-ascii word #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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: 2 additions & 2 deletions plan/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def _write_to_crontab(self, action, content):
command.append(tmp_cronfile.name)

try:
output, error, returncode = communicate_process(command)
output, error, returncode = communicate_process(command, encoding='utf-8')
if returncode != 0:
raise PlanError("couldn't write crontab; try running check to "
"ensure your cronfile is valid.")
Expand All @@ -199,7 +199,7 @@ def read_crontab(self):
if self.user:
command.extend(["-u", str(self.user)])
try:
r = communicate_process(command, universal_newlines=True)
r = communicate_process(command, universal_newlines=True, encoding='utf-8')
output, error, returncode = r
if returncode != 0:
raise PlanError("couldn't read crontab")
Expand Down