Commit 3d9c04e1 authored by Gaute Hope's avatar Gaute Hope

Avoid shorthand if statement

parent 9f760734
......@@ -446,10 +446,15 @@ class Crontab:
preview = self.__make_preview__ (command)
#add task to treemodel in mainWindow
if easy:
easy_s = self.__easy__ (minute, hour, day, month, weekday)
else:
easy_s = ""
if minute == "@reboot":
data.append([title, (self.__easy__ (minute, hour, day, month, weekday) if easy else "") , preview, line, linecount, time, self, None, job_id, "", "","", _("Recurrent"), "crontab", output, _("At reboot")])
data.append([title, easy_s , preview, line, linecount, time, self, None, job_id, "", "","", _("Recurrent"), "crontab", output, _("At reboot")])
else:
data.append([title, (self.__easy__ (minute, hour, day, month, weekday) if easy else ""), preview, line, linecount, time, self, None, job_id, "", "","", _("Recurrent"), "crontab", output, time])
data.append([title, easy_s, preview, line, linecount, time, self, None, job_id, "", "","", _("Recurrent"), "crontab", output, time])
linecount = linecount + 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment