community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r924352 - /comdev/nearby_people/nearby/foaf.py
Date Wed, 17 Mar 2010 16:19:36 GMT
Author: nick
Date: Wed Mar 17 16:19:36 2010
New Revision: 924352

URL: http://svn.apache.org/viewvc?rev=924352&view=rev
Log:
Allow people to specify in doap files a URI like http://people.apache.org/~foo/foo.rdf without
thinking it is a svn checkout one

Modified:
    comdev/nearby_people/nearby/foaf.py

Modified: comdev/nearby_people/nearby/foaf.py
URL: http://svn.apache.org/viewvc/comdev/nearby_people/nearby/foaf.py?rev=924352&r1=924351&r2=924352&view=diff
==============================================================================
--- comdev/nearby_people/nearby/foaf.py (original)
+++ comdev/nearby_people/nearby/foaf.py Wed Mar 17 16:19:36 2010
@@ -64,10 +64,10 @@ class FOAF(object):
                 continue
             #print uri
 
-            if uri.startswith(PEOPLE_FOAF_NAMESPACE):
-                relfile = uri.replace(PEOPLE_FOAF_NAMESPACE,"")
-                file = os.path.join(PEOPLE_FOAF_PATH, relfile)
-                self._parse_foaf(file, relfile)
+            people_rel_uri = uri.replace(PEOPLE_FOAF_NAMESPACE,"")
+            if uri != people_rel_uri and people_rel_uri.find("/") == -1:
+                file = os.path.join(PEOPLE_FOAF_PATH, people_rel_uri)
+                self._parse_foaf(file, people_rel_uri)
             else:
                 usock = urllib.urlopen(uri)
                 self._parse_foaf(usock, uri)



Mime
View raw message