def _logInfo(self, dialog): version = ' '.join(sys.version.split()) msg = getMessage(self._ctx, g_message, 121, version) logMessage(self._ctx, INFO, msg, "OptionsDialog", "_logInfo()") path = os.pathsep.join(sys.path) msg = getMessage(self._ctx, g_message, 122, path) logMessage(self._ctx, INFO, msg, "OptionsDialog", "_logInfo()") url = getLoggerUrl(self._ctx) self._setDialogText(dialog, url)
def _getDriverVersion(self): try: service = '%s.Driver' % g_identifier driver = createService(self._ctx, service) url = 'sdbc:hsqldb:mem:///dbversion' connection = driver.connect(url, ()) version = connection.getMetaData().getDriverVersion() connection.close() return version except UnoException as e: msg = getMessage(self._ctx, g_message, 141, e.Message) logMessage(self._ctx, SEVERE, msg, 'OptionsDialog', '_getDriverVersion()') except Exception as e: msg = getMessage(self._ctx, g_message, 142, (e, traceback.print_exc())) logMessage(self._ctx, SEVERE, msg, 'OptionsDialog', '_getDriverVersion()')
def __init__(self, ctx): self._ctx = ctx self.stringResource = getStringResource(ctx, g_identifier, g_extension, 'OptionsDialog') msg = getMessage(ctx, g_message, 101) logMessage(ctx, INFO, msg, 'OptionsDialog', '__init__()')
def _clearLog(self, dialog): clearLogger() msg = getMessage(self._ctx, g_message, 111) logMessage(self._ctx, INFO, msg, 'OptionsDialog', '_clearLog()') url = getLoggerUrl(self._ctx) self._setDialogText(dialog, url)
def _loadVersion(self, dialog): if self._isUpdated(): version = getMessage(self._ctx, g_message, 131) else: version = self._getDriverVersion() dialog.getControl('Label3').Text = version