[gnome-schedule] Avoid shorthand if statement



commit 3d9c04e1f10f7251f1a03ecd495dcf948c60af0f
Author: Gaute Hope <eg gaute vetsj com>
Date:   Fri Sep 9 22:04:15 2011 +0200

    Avoid shorthand if statement

 src/crontab.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/crontab.py b/src/crontab.py
index 3add77f..d77e2ed 100644
--- a/src/crontab.py
+++ b/src/crontab.py
@@ -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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]