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:45:55 (GMT)
committer Gonzalo Odiard <godiard@sugarlabs.org>2010-10-19 12:45:55 (GMT)
commitc5773e8f199fdab542c8830a644fd00932b1c262 (patch)
treebafd10090fe243f246d6f24bc43a4f77c37a7eac /browser.py
parent02604d764ab5d48f62df9b21fe011679e6808c7a (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 8e1dab5..7b0ec1d 100644
--- a/browser.py
+++ b/browser.py
@@ -300,6 +300,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)