[gnome-schedule] add default values for output, display and command_d for get_job_data



commit 4b731968646f578712e4a2b5214344ca45df4a65
Author: Gaute Hope <eg gaute vetsj com>
Date:   Wed Jul 8 19:25:25 2009 +0200

    add default values for output, display and command_d for get_job_data

 src/crontab.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/crontab.py b/src/crontab.py
index dac84c7..9b30e2e 100644
--- a/src/crontab.py
+++ b/src/crontab.py
@@ -663,6 +663,7 @@ class Crontab:
             desc = d[5:d.find ("\n")]
             d = d[d.find ("\n") + 1:]
             
+            output = 0
             if (ver >= 2) and (ver < 4):
                 output_str = d[9:d.find ("\n")]
                 output = int (output_str)
@@ -673,12 +674,14 @@ class Crontab:
                 output = int (output_str)
                 d = d[d.find ("\n") + 1:]
                 
+            display = ""
             if ver >= 4:
                 display = d[8:d.find ("\n")]
                 d = d[d.find ("\n") + 1:]
                 if (len (display) < 1) or (output < 2):
                     display = ""
 
+            command_d = ""
             if ver >= 5:
                 command_d = d[10:d.find ("\n")]
                 d = d[d.find ("\n") + 1:]



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