From 43c6c427475fafe8d40288f49c4cf9bb12598366 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sun, 20 Sep 2009 02:52:39 +0000 Subject: [PATCH] bad hack for whitespace auto removal by python --- update-xmpp-status.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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: -- 1.7.10.4