diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-08-16 10:38:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-08-16 13:05:52 +0200 |
commit | 9a97a26511584f41c3753fa9536e1c4a8dce637a (patch) | |
tree | 7d19945f71fa61bb3db43866b741cc50602c06db /scripting | |
parent | 700c8ec9782c3d81fef0e42146af6b69ecd84e2a (diff) |
member 'Context' of struct type 'uno.Exception' not given a value
Change-Id: Ie80f729e5c1dbf3214f9532dcb935b239bac7997
Reviewed-on: https://gerrit.libreoffice.org/77566
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/pyprov/pythonscript.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py index 67251e6ada61..bd2aa3e1670e 100644 --- a/scripting/source/pyprov/pythonscript.py +++ b/scripting/source/pyprov/pythonscript.py @@ -176,6 +176,7 @@ def toIniName( str ): class MyUriHelper: def __init__( self, ctx, location ): + self.ctx = ctx self.s_UriMap = \ { "share" : "vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/Scripts/python" , \ "share:uno_packages" : "vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE/uno_packages", \ @@ -203,7 +204,7 @@ class MyUriHelper: if not storageURI.startswith( self.m_baseUri ): message = "pythonscript: storage uri '" + storageURI + "' not in base uri '" + self.m_baseUri + "'" log.debug( message ) - raise RuntimeException( message ) + raise RuntimeException( message, self.ctx ) ret = "vnd.sun.star.script:" + \ storageURI[len(self.m_baseUri)+1:].replace("/","|") + \ @@ -235,12 +236,12 @@ class MyUriHelper: if not xFileUri: message = "pythonscript: invalid relative uri '" + sFileUri+ "'" log.debug( message ) - raise RuntimeException( message ) + raise RuntimeException( message, self.ctx ) if xFileUri.isAbsolute(): message = "pythonscript: an absolute uri is invalid '" + sFileUri+ "'" log.debug( message ) - raise RuntimeException( message ) + raise RuntimeException( message, self.ctx ) # absolute path to the .py file xAbsScriptUri = self.m_uriRefFac.makeAbsolute(xBaseUri, xFileUri, True, RETAIN) @@ -250,7 +251,7 @@ class MyUriHelper: if not sAbsScriptUri.startswith(sBaseUri): message = "pythonscript: storage uri '" + sAbsScriptUri + "' not in base uri '" + self.m_baseUri + "'" log.debug( message ) - raise RuntimeException( message ) + raise RuntimeException( message, self.ctx ) ret = sAbsScriptUri if funcNameStart != -1: @@ -259,10 +260,10 @@ class MyUriHelper: return ret except UnoException as e: log.error( "error during converting scriptURI="+scriptURI + ": " + e.Message) - raise RuntimeException( "pythonscript:scriptURI2StorageUri: " + e.Message, None ) + raise RuntimeException( "pythonscript:scriptURI2StorageUri: " + e.Message, self.ctx ) except Exception as e: log.error( "error during converting scriptURI="+scriptURI + ": " + str(e)) - raise RuntimeException( "pythonscript:scriptURI2StorageUri: " + str(e), None ) + raise RuntimeException( "pythonscript:scriptURI2StorageUri: " + str(e), self.ctx ) class ModuleEntry: |