[gnome-schedule/freebsd] Refine FreeBSD regexp
- From: Gaute Hope <gauteh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-schedule/freebsd] Refine FreeBSD regexp
- Date: Tue, 4 Oct 2011 22:49:38 +0000 (UTC)
commit 87cec1bb8febb038e7e0497bad2f814a4e5a86bd
Author: Gaute Hope <eg gaute vetsj com>
Date: Wed Oct 5 00:44:43 2011 +0200
Refine FreeBSD regexp
src/at.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/at.py b/src/at.py
index 371a03f..aac8c57 100644
--- a/src/at.py
+++ b/src/at.py
@@ -58,10 +58,10 @@ class At:
# FreeBSD atq output, parser ignores time zone information
if self.sysname == 'FreeBSD':
print "[AT] FreeBSD."
- self.atRecordRegex = re.compile ('^(?P<dow>.{3})(?P<month>\s.{3})\s(?P<day>[0-9]+)\s(?P<time>[0-2][0-9]:[0-5][0-9]:[0-5][0-9])\s(?:(?P<tzone>.*)\s|)(?P<year>[0-9]{4})\s*(?P<owner>.+)\s*(?P<queue>[a-z]|[A-Z])\s*(?P<jobid>[0-9]*)$')
+ self.atRecordRegex = re.compile ('^(?P<dow>.{3})(?P<month>[\s].{3})[\s](?P<day>[0-9]+)[\s](?P<time>[0-2][0-9]:[0-5][0-9]:[0-5][0-9])[\s](?:(?P<tzone>.*)[\s]|)(?P<year>[0-9]{4})[\t]+(?P<owner>.+)[\s]+(?P<queue>[a-z]|[A-Z])[\t](?P<jobid>[0-9]*)$')
# after you add a job, this line is printed to stderr
# Job 5 will be executed using /bin/sh
- self.atRecordRegexAdd = re.compile('^Job\s(?P<jobid>[0-9]+)\swill')
+ self.atRecordRegexAdd = re.compile('^Job[\s](?P<jobid>[0-9]+)[\s]will')
# General Linux atq output
else:
@@ -549,7 +549,8 @@ fi
#print _("added %(id)s") % { "id": job_id }
else:
- print _("Warning: a line in atq's output didn't parse: %s") % 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]