Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/browser.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@sugarlabs.org>2010-10-19 12:36:18 (GMT)
committer Gonzalo Odiard <godiard@sugarlabs.org>2010-10-19 12:43:08 (GMT)
commitdbdd9dc72d7c0462fddc95324e7213fe10d5c2ec (patch)
tree760c71dfd45020fed4cbeffa3fb809a1ba013f49 /browser.py
parentbd89337731721d3628fb1980de1120e646926346 (diff)
fix error writing file if there are not a url in the location bar
Diffstat (limited to 'browser.py')
-rw-r--r--browser.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/browser.py b/browser.py
index 3781e2e..0f3f51c 100644
--- a/browser.py
+++ b/browser.py
@@ -176,6 +176,8 @@ class Browser(WebView):
"""
get a nsIURI object and return a string with the url
"""
+ if uri == None:
+ return ''
cls = components.classes['@mozilla.org/intl/texttosuburi;1']
texttosuburi = cls.getService(interfaces.nsITextToSubURI)
return texttosuburi.unEscapeURIForUI(uri.originCharset, uri.spec)