-fix errors. - added verbose output
authorTony Mack <tmack@cs.princeton.edu>
Tue, 18 Mar 2008 23:17:12 +0000 (23:17 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Tue, 18 Mar 2008 23:17:12 +0000 (23:17 +0000)
qaapi/qa/PLCs.py

index ff0d506..dacee1b 100644 (file)
@@ -1,5 +1,6 @@
 import os
-import copy    
+import copy
+import qa.utils        
 from Remote import Remote
 from Table import Table
 
@@ -33,10 +34,11 @@ class PLC(dict, Remote):
        standalone http server that listens on the specified port.
        This is useful for running multiple api servers on the same machine.
        """
-       if 'host' in self and not host in ['localhost', None]:
+       if 'host' in self and not 'host' in ['localhost', None]:
            server_script = "/usr/share/plc_api/Server.py" 
            self.commands("%s -p %s" % (server_script, self['port']))    
+           if self.config.verbose:
+               utils.header("Starting api server at %s on listening on port %s" % (self['host'], self['port']))     
 
 class PLCs(list, Table):