[gnome-schedule/freebsd] Skip header in atq output
- From: Gaute Hope <gauteh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-schedule/freebsd] Skip header in atq output
- Date: Tue, 4 Oct 2011 23:09:01 +0000 (UTC)
commit 09bb70bc8dd32b0374700bb8ae99d8d8f3a8c0b1
Author: Gaute Hope <eg gaute vetsj com>
Date: Wed Oct 5 00:54:22 2011 +0200
Skip header in atq output
src/at.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/at.py b/src/at.py
index aac8c57..df98fde 100644
--- a/src/at.py
+++ b/src/at.py
@@ -517,8 +517,12 @@ fi
#do 'atq'
execute = config.getAtqbin ()
self.lines = os.popen(execute).readlines()
- for line in self.lines:
+ # Skip header: Date..
+ if self.system == 'FreeBSD':
+ self.lines = self.lines[1:]
+
+ for line in self.lines:
array_or_false = self.parse (line)
#print array_or_false
if array_or_false != False:
@@ -549,8 +553,8 @@ fi
#print _("added %(id)s") % { "id": job_id }
else:
- print _("Warning: a line in atq's output didn't parse.")
- print line
+ print _("Warning: a line in atq's output didn't parse.")
+ print line
return data
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]