diff options
Diffstat (limited to 'scripting/source/pyprov')
-rw-r--r-- | scripting/source/pyprov/pythonscript.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py index a2fc4f055a10..e4d6a2e965b5 100644 --- a/scripting/source/pyprov/pythonscript.py +++ b/scripting/source/pyprov/pythonscript.py @@ -153,7 +153,7 @@ g_implName = "org.libreoffice.pyuno.LanguageScriptProviderFor"+LANGUAGENAME BLOCK_SIZE = 65536 def readTextFromStream( inputStream ): # read the file - code = uno.ByteSequence( "" ) + code = uno.ByteSequence( b"" ) while True: read,out = inputStream.readBytes( None , BLOCK_SIZE ) code = code + out @@ -549,9 +549,8 @@ class ScriptBrowseNode( unohelper.Base, XBrowseNode , XPropertySet, XInvocation, elif event.ActionCommand == "Save": toWrite = uno.ByteSequence( - str( self.editor.getControl("EditorTextField").getText().encode( - sys.getdefaultencoding())) ) + sys.getdefaultencoding()) ) copyUrl = self.uri + ".orig" self.provCtx.sfa.move( self.uri, copyUrl ) out = self.provCtx.sfa.openFileWrite( self.uri ) |