def _logInfo(self, dialog): version = ' '.join(sys.version.split()) msg = getMessage(self.ctx, g_message, 111, version) logMessage(self.ctx, INFO, msg, "OptionsDialog", "_logInfo()") path = os.pathsep.join(sys.path) msg = getMessage(self.ctx, g_message, 112, path) logMessage(self.ctx, INFO, msg, "OptionsDialog", "_logInfo()") msg = getMessage(self.ctx, g_message, 113, requests.__version__) logMessage(self.ctx, INFO, msg, "OptionsDialog", "_logInfo()") msg = getMessage(self.ctx, g_message, 114, requests.urllib3.__version__) logMessage(self.ctx, INFO, msg, "OptionsDialog", "_logInfo()") try: import ssl except ImportError as e: print("OptionsDialog._logInfo() 1 %s" % (dir(e), )) msg = getExceptionMessage(e) print("OptionsDialog._logInfo() 2") msg = getMessage(self.ctx, g_message, 116, msg) else: msg = getMessage(self.ctx, g_message, 115, ssl.OPENSSL_VERSION) print("OptionsDialog._logInfo() 3") logMessage(self.ctx, INFO, msg, "OptionsDialog", "_logInfo()") url = getLoggerUrl(self.ctx) self._setDialogText(dialog, url)
def _viewLog(self, window): dialog = getDialog(self.ctx, 'OAuth2OOo', 'LogDialog', self, window.Peer) url = getLoggerUrl(self.ctx) dialog.Title = url self._setDialogText(dialog, url) dialog.execute() dialog.dispose()
def _doView(self, window): url = getLoggerUrl(self.ctx) length, sequence = getFileSequence(self.ctx, url) text = sequence.value.decode('utf-8') dialog = self._getLogDialog() dialog.Title = url dialog.getControl('TextField1').Text = text dialog.execute() dialog.dispose()
def _clearLog(self, dialog): try: clearLogger() msg = getMessage(self.ctx, g_message, 101) logMessage(self.ctx, INFO, msg, 'OptionsDialog', '_clearLog()') url = getLoggerUrl(self.ctx) self._setDialogText(dialog, url) except Exception as e: msg = "Error: %s - %s" % (e, traceback.print_exc()) logMessage(self.ctx, SEVERE, msg, "OptionsDialog", "_clearLog()")