[CMF-checkins] CVS: CMF/CMFDefault - Favorite.py:1.16

Florent Guillaume fg@nuxeo.com
Mon, 1 Jul 2002 09:52:49 -0400


Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv12849

Modified Files:
	Favorite.py 
Log Message:
Clarified code, as tokens[0] (the scheme) is never empty, we passed a default.


=== CMF/CMFDefault/Favorite.py 1.15 => 1.16 ===
         # strip off scheme and machine from URL if present
         tokens = urlparse.urlparse( remote_url, 'http' )
-        if tokens[0] or tokens[1]:
+        if tokens[1]:
+            # There is a nethost, remove it
             t=('', '') + tokens[2:]
             remote_url=urlparse.urlunparse(t)
         # if URL begins with site URL, remove site URL