Kaydet (Commit) 0e5318aa authored tarafından Andrea Gelmini's avatar Andrea Gelmini Kaydeden (comit) Noel Grandin

Script: better way to detect Windows

Change-Id: I0e99443f3715cde4414d14b2fa507ecab0995c6d
Reviewed-on: https://gerrit.libreoffice.org/18937Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst b78a2bc3
......@@ -23,6 +23,7 @@ import os
import imp
import time
import ast
import platform
try:
unicode
......@@ -161,9 +162,9 @@ def readTextFromStream( inputStream ):
return code.value
def toIniName( str ):
# TODO: what is the official way to get to know whether i am on the windows platform ?
if( hasattr(sys , "dllhandle") ):
if platform.system() == "Windows":
return str + ".ini"
else:
return str + "rc"
......@@ -561,7 +562,7 @@ class ScriptBrowseNode( unohelper.Base, XBrowseNode , XPropertySet, XInvocation,
# text = self.editor.getControl("EditorTextField").getText()
# log.debug("Would save: " + text)
except:
# TODO: add an error box here !
# TODO: add an error box here!
log.error( lastException2String() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment