diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-04-01 22:43:32 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-04-02 12:33:34 +0200 |
commit | 8ac24de12f9ff6727fa0cc77e4ae180d7dc32a0b (patch) | |
tree | a5ac4261eba518f9d32e41467264c9935188cdd9 | |
parent | 51ac74617a33f518d068dd6e1f86431ee805bfbc (diff) |
convwatch.py: fix handling of loadComponentFromURL returning null
Change-Id: Icc64d56a74be9e95fdf69204356f9c2405ce7cc8
-rw-r--r-- | bin/convwatch.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/convwatch.py b/bin/convwatch.py index bef3f9e16c77..283e67e52581 100644 --- a/bin/convwatch.py +++ b/bin/convwatch.py @@ -240,8 +240,11 @@ def loadFromURL(xContext, url): xGEB = xContext.getValueByName( "/singletons/com.sun.star.frame.theGlobalEventBroadcaster") xGEB.addDocumentEventListener(xListener) + xDoc = None try: xDoc = xDesktop.loadComponentFromURL(url, "_blank", 0, loadProps) + if xDoc is None: + raise Exception("No document loaded?") time_ = 0 while time_ < 30: if xListener.layoutFinished: @@ -280,6 +283,7 @@ class LoadPrintFileTest: self.prtsuffix = prtsuffix def run(self, xContext): print("Loading document: " + self.file) + xDoc = None try: url = "file://" + quote(self.file) xDoc = loadFromURL(xContext, url) |