From: Brian Jones Date: Mon, 24 Sep 2012 22:51:13 +0000 (-0700) Subject: Changing python search pattern to look for localhost as well. X-Git-Tag: accepted/trunk/20120924.224956^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32f2a92c2f0e1c0ab2d786b9549a41555b86748e;p=profile%2Fivi%2Fremotecontrol.git Changing python search pattern to look for localhost as well. Otherwise once localhost is used, it will never be able to change it. --- diff --git a/remotecontrol/remoteserver.py b/remotecontrol/remoteserver.py index 653a49f..6a9e728 100644 --- a/remotecontrol/remoteserver.py +++ b/remotecontrol/remoteserver.py @@ -135,7 +135,7 @@ def start(): finput = open(filename, 'r') content = finput.read() - for match in re.findall( r'ws://[0-9]+(?:\.[0-9]+){3}:[0-9]+', content): + for match in re.findall( r'ws://[0-9|a-z|A-Z|.]+:[0-9]+', content): print 'Replacing existing websocket ip address', match, 'with new ip', ws_url content = content.replace(match, ws_url)