projects
/
svn42.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
07a9ad5
)
error sound
author
Bernhard Tittelbach
<xro@realraum.at>
Fri, 6 Aug 2010 21:24:13 +0000
(21:24 +0000)
committer
Bernhard Tittelbach
<xro@realraum.at>
Fri, 6 Aug 2010 21:24:13 +0000
(21:24 +0000)
play-sound-status.py
patch
|
blob
|
history
diff --git
a/play-sound-status.py
b/play-sound-status.py
index
77abfd6
..
535c449
100755
(executable)
--- a/
play-sound-status.py
+++ b/
play-sound-status.py
@@
-294,7
+294,9
@@
else:
#socket.setdefaulttimeout(10.0) #affects all new Socket Connections (urllib as well)
RE_PRESENCE = re.compile(r'Presence: (yes|no)(?:, (opened|closed), (.+))?')
RE_BUTTON = re.compile(r'PanicButton|button\d?')
#socket.setdefaulttimeout(10.0) #affects all new Socket Connections (urllib as well)
RE_PRESENCE = re.compile(r'Presence: (yes|no)(?:, (opened|closed), (.+))?')
RE_BUTTON = re.compile(r'PanicButton|button\d?')
-RE_REQUEST = re.compile(r'Request: (\w+) (?:(Card|Phone) )?(.+)')
+#RE_REQUEST = re.compile(r'Request: (\w+) (?:(Card|Phone) )?(.+)')
+RE_ERROR = re.compile(r'Error: (.+)')
+
while True:
try:
if not os.path.exists(uwscfg.tracker_socket):
while True:
try:
if not os.path.exists(uwscfg.tracker_socket):
@@
-330,6
+332,11
@@
while True:
if not m is None:
playThemeOf(user="panic")
continue
if not m is None:
playThemeOf(user="panic")
continue
+
+ m = RE_ERROR.match(line)
+ if not m is None:
+ playThemeOf(user="error")
+ continue
except Exception, ex:
logging.error("main: "+str(ex))
except Exception, ex:
logging.error("main: "+str(ex))