From 25128f34cdfae5318d1a38441bf09781ef91a2ba Mon Sep 17 00:00:00 2001 From: Triatmoko Date: Thu, 17 Nov 2011 04:24:51 +0100 Subject: update loging files for every handler and fic device configuration function --- Under-Testing/Server-Code-New/startSoftware.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Under-Testing/Server-Code-New/startSoftware.py') diff --git a/Under-Testing/Server-Code-New/startSoftware.py b/Under-Testing/Server-Code-New/startSoftware.py index 2d54560..b2beb58 100644 --- a/Under-Testing/Server-Code-New/startSoftware.py +++ b/Under-Testing/Server-Code-New/startSoftware.py @@ -1,7 +1,9 @@ #! /usr/bin/env python import ServerClass -import subprocess +import subprocess +import setproctitle +setproctitle.setproctitle('Start Software') while 1: # try connect to website server = ServerClass.ServerHandler(34600) @@ -9,9 +11,11 @@ while 1: test = server.receiveData(2) if test == 'START APP': print 'start' - #subprocess.Popen(args=['gnome-terminal','--command= python gsmselftest.py']) - script = 'gsmselftest.py' - subprocess.Popen(['python',script], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + try: + script = 'gsmselftest.py' + subprocess.Popen(['python',script], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + except ValueError: + print " - can't start controller software -" server.closeConnection() del server -- cgit v1.2.3-55-g7522