scripting/source/pyprov/pythonscript.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 55638b9f72beeebde6887d620ce1513bbda7e506 Author: Rene Engelhard <[email protected]> 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 <[email protected]> diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py index 3ddcec6..4d8b6ba 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 64f291c6d1f5ce9a1e5f7d0b8d2351e363c60d5c Author: Michael Stahl <[email protected]> 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 <[email protected]> diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py index dbc5725..3ddcec6 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: _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
