[gnome-schedule/eximport] Fix gettext error by not loading easy-string for crontab tasks
- From: Gaute Hope <gauteh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-schedule/eximport] Fix gettext error by not loading easy-string for crontab tasks
- Date: Sun, 12 Jun 2011 09:05:12 +0000 (UTC)
commit ab4b907940a9b059cc4fc87239547efdba72200b
Author: Gaute Hope <eg gaute vetsj com>
Date: Sun Jun 12 11:03:49 2011 +0200
Fix gettext error by not loading easy-string for crontab tasks
src/crontab.py | 6 +++---
src/gnome-schedule-export.py | 2 +-
src/gnome-schedule-import.py | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/crontab.py b/src/crontab.py
index e29f958..3add77f 100644
--- a/src/crontab.py
+++ b/src/crontab.py
@@ -422,7 +422,7 @@ class Crontab:
return True
#read tasks in crontab
- def read (self):
+ def read (self, easy = True):
data = []
@@ -447,9 +447,9 @@ class Crontab:
#add task to treemodel in mainWindow
if minute == "@reboot":
- data.append([title, self.__easy__ (minute, hour, day, month, weekday), preview, line, linecount, time, self, None, job_id, "", "","", _("Recurrent"), "crontab", output, _("At 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")])
else:
- data.append([title, self.__easy__ (minute, hour, day, month, weekday), preview, line, linecount, time, self, None, job_id, "", "","", _("Recurrent"), "crontab", output, time])
+ 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])
linecount = linecount + 1
diff --git a/src/gnome-schedule-export.py b/src/gnome-schedule-export.py
index ed62896..090de57 100755
--- a/src/gnome-schedule-export.py
+++ b/src/gnome-schedule-export.py
@@ -84,7 +84,7 @@ else:
d = GnomeScheduleDB ()
c = crontab.Crontab (is_root, user, uid, gid, home_dir)
-tasks = c.read ()
+tasks = c.read (easy = False)
crontabc = 0
cl = []
for task in tasks:
diff --git a/src/gnome-schedule-import.py b/src/gnome-schedule-import.py
index 336f3da..aa22703 100755
--- a/src/gnome-schedule-import.py
+++ b/src/gnome-schedule-import.py
@@ -88,7 +88,7 @@ else:
d = pickle.load (of)
c = crontab.Crontab (is_root, user, uid, gid, home_dir)
-c.read ()
+c.read (easy = False)
crontabc = 0
for task in d.crontab:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]