[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - 2 commits - scripting/source
Rene Engelhard
rene at debian.org
Wed Aug 21 15:08:48 PDT 2013
scripting/source/pyprov/pythonscript.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 5e06eb4c32c84079b6817e6d1da71bb84c5c367b
Author: Rene Engelhard <rene at debian.org>
Date: Wed Aug 21 10:11:14 2013 +0200
deb#719941: pythonscript.py: use open() instead of file()
Change-Id: Ib9f06b2b5629d149e932fe37312fdf5e8448c39f
Signed-off-by: Michael Stahl <mstahl at redhat.com>
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 27ac6bd85..b6b0123 100755
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -70,7 +70,7 @@ def getLogTarget():
userInstallation = pathSubst.getSubstituteVariableValue( "user" )
if len( userInstallation ) > 0:
systemPath = uno.fileUrlToSystemPath( userInstallation + "/Scripts/python/log.txt" )
- ret = file( systemPath , "a" )
+ ret = open( systemPath , "a" )
except:
print("Exception during creation of pythonscript logfile: "+ lastException2String() + "\n, delagating log to stdout\n")
return ret
commit 8507627388a3a2c213177566f8c18ba5d36dc67d
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Aug 20 17:16:16 2013 +0200
deb#719941: unbreak python script provider debug logging on Python 3
Don't mess with encoding in Logger.log, since sys.stdout.write()
accepts str (in python3) and both str/unicode (in python2) anyway.
Change-Id: Ib0339b7fd882a7654cc24c38efdaf67f519663ff
Signed-off-by: Michael Stahl <mstahl at redhat.com>
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index c92d212..27ac6bd85 100755
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -101,7 +101,7 @@ class Logger(LogLevel):
" [" +
logLevel2String( level ) +
"] " +
- encfile(msg) +
+ msg +
"\n" )
self.target.flush()
except:
More information about the Libreoffice-commits
mailing list