Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/viewer.py
diff options
context:
space:
mode:
Diffstat (limited to 'viewer.py')
-rw-r--r--viewer.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/viewer.py b/viewer.py
index bca8200..2bc89eb 100644
--- a/viewer.py
+++ b/viewer.py
@@ -38,10 +38,13 @@ class ViewerProcess():
def getProcessInfo(self):
return self._utilities.getNetworkProcessInfo(self._programName)
- def startProcess(self, ip):
+ def startProcess(self, networkDict):
if not self.getStatus():
- self._args = [ ip ]
- self._utilities.startProgram(self._programName,self._args)
+ for interface, ip in networkDict.iteritems():
+ if interface != "lo" and ip != "":
+ self._args = [ ip ]
+ self._utilities.startProgram(self._programName,self._args)
+ break
class ViewerUI():
"""Viewer UI component for Classroom Kit Activity
@@ -153,5 +156,5 @@ class Viewer():
"""
self._ui.showStatus()
- def startViewer(self, ip):
- self._process.startProcess(ip)
+ def startViewer(self, networkDict):
+ self._process.startProcess(networkDict)