From: Bernhard Tittelbach <xro@realraum.at>
Date: Sun, 20 Sep 2009 02:52:39 +0000 (+0000)
Subject: bad hack for whitespace auto removal by python
X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=43c6c427475fafe8d40288f49c4cf9bb12598366;p=svn42.git

bad hack for whitespace auto removal by python
---

diff --git a/update-xmpp-status.py b/update-xmpp-status.py
index 42d5dcc..d2f0ad2 100755
--- a/update-xmpp-status.py
+++ b/update-xmpp-status.py
@@ -37,8 +37,8 @@ class UWSConfig:
     self.config_parser.set('msg','status_opened_msg',"RealRaum door now open")
     self.config_parser.set('msg','status_closed_msg',"RealRaum door now closed")
     self.config_parser.set('msg','status_error_msg',"ERROR Last Operation took too long !!!")
-    self.config_parser.set('msg','request_msg'," after ${request} request")
-    self.config_parser.set('msg','comment_msg'," (${comment})")
+    self.config_parser.set('msg','request_msg',"\safter ${request} request")
+    self.config_parser.set('msg','comment_msg',"\s(${comment})")
     self.config_parser.add_section('debug')
     self.config_parser.set('debug','enabled',"False")
     self.config_mtime=0
@@ -67,6 +67,11 @@ class UWSConfig:
         self.config_mtime=os.path.getmtime(self.configfile)
       except (ConfigParser.ParsingError, IOError), pe_ex:
         logging.error("Error parsing Configfile: "+str(pe_ex))
+      self.config_parser.set('msg','comment_msg', self.config_parser.get('msg','comment_msg').replace("\s"," "))
+      self.config_parser.set('msg','request_msg', self.config_parser.get('msg','request_msg').replace("\s"," "))
+      self.config_parser.set('msg','status_error_msg', self.config_parser.get('msg','status_error_msg').replace("\s"," "))
+      self.config_parser.set('msg','status_closed_msg', self.config_parser.get('msg','status_closed_msg').replace("\s"," "))
+      self.config_parser.set('msg','status_opened_msg', self.config_parser.get('msg','status_opened_msg').replace("\s"," "))
       if self.config_parser.get('debug','enabled') == "True":
         logger.setLevel(logging.DEBUG)
       else: