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
8 changes: 4 additions & 4 deletions django_crontab/crontab.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ def show_jobs(self):
if job and job[0][4] == self.settings.CRONTAB_COMMENT:
# output the job hash and details if the verbose option is specified
if self.verbosity >= 1:
job_hash = job[0][2].split('crontab run')[1].split()[0]
print(u'%s -> %s' % (
job[0][2].split()[4],
self.__get_job_by_hash(job[0][2][job[0][2].find('crontab run') + 12:].split()[0])
job_hash, self.__get_job_by_hash(job_hash)
))

def remove_jobs(self):
Expand All @@ -135,9 +135,9 @@ def remove_jobs(self):
self.crontab_lines.remove(line)
# output the action if the verbose option is specified
if self.verbosity >= 1:
job_hash = job[0][2].split('crontab run')[1].split()[0]
print('removing cronjob: (%s) -> %s' % (
job[0][2].split()[4],
self.__get_job_by_hash(job[0][2][job[0][2].find('crontab run') + 12:].split()[0])
job_hash, self.__get_job_by_hash(job_hash)
))

# noinspection PyBroadException
Expand Down