# HG changeset patch # User Dirk Olmes # Date 1411697903 -7200 # Node ID 8f93457656b4195c199de89480e68641ec8ca691 # Parent 88b0f704e2abed8c6016b04a865a507883f72cf6 display the command that's executed in the log viewer diff -r 88b0f704e2ab -r 8f93457656b4 RemoteViewer/Viewer.py --- a/RemoteViewer/Viewer.py Fri Sep 26 04:09:37 2014 +0200 +++ b/RemoteViewer/Viewer.py Fri Sep 26 04:18:23 2014 +0200 @@ -22,20 +22,22 @@ self.process = None def open(self, parent): - command = self.buildCommand() - self.process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - self.__startLogThread(self.process.stdout) + self.buildCommand() + self.process = subprocess.Popen(self.command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + self.__startLogThread() self.process.wait() - def __startLogThread(self, output): + def __startLogThread(self): logViewer = self.__createLogViewer() - readThread = ReadThread(output, logViewer) + readThread = ReadThread(self.process.stdout, logViewer) readThread.start() logViewer.exec_() def __createLogViewer(self): viewer = LogViewer() viewer.setWindowTitle(self.connection.displayString()) + command = 'running ' + ' '.join(self.command) + '\n' + viewer.append(command) return viewer class VncViewer(AbstractViewer): @@ -49,8 +51,6 @@ self.append('/t:', self.connection.displayString()) self.append('/u:', self.connection.user) self.append('/size:', self.connection.geometry) - print(self.command) - return self.command def append(self, option, value): if value is not None: