community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r951470 - in /comdev/nearby_people: local_settings.py.example nearby/foaf.py
Date Fri, 04 Jun 2010 16:07:42 GMT
Author: nick
Date: Fri Jun  4 16:07:42 2010
New Revision: 951470

URL: http://svn.apache.org/viewvc?rev=951470&view=rev
Log:
If someone lists a FOAF file that is missing, warn to the logs rather than breaking

Modified:
    comdev/nearby_people/local_settings.py.example
    comdev/nearby_people/nearby/foaf.py

Modified: comdev/nearby_people/local_settings.py.example
URL: http://svn.apache.org/viewvc/comdev/nearby_people/local_settings.py.example?rev=951470&r1=951469&r2=951470&view=diff
==============================================================================
--- comdev/nearby_people/local_settings.py.example (original)
+++ comdev/nearby_people/local_settings.py.example Fri Jun  4 16:07:42 2010
@@ -25,6 +25,9 @@ TEMPLATE_DEBUG = DEBUG
 ADMINS = (
     # ('Your Name', 'your_email@domain.com'),
 )
+MANAGERS = ADMINS
+
+EMAIL_HOST = "localhost"
 
 # Database settings
 # (This can be left blank for now - we're not database backed)

Modified: comdev/nearby_people/nearby/foaf.py
URL: http://svn.apache.org/viewvc/comdev/nearby_people/nearby/foaf.py?rev=951470&r1=951469&r2=951470&view=diff
==============================================================================
--- comdev/nearby_people/nearby/foaf.py (original)
+++ comdev/nearby_people/nearby/foaf.py Fri Jun  4 16:07:42 2010
@@ -76,7 +76,10 @@ class FOAF(object):
             people_rel_uri = people_rel_uri.replace(PEOPLE_FOAF_ALT_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)
+                if os.path.exists(file):
+                  self._parse_foaf(file, people_rel_uri)
+                else:
+                  sys.stderr.write("Missing FOAF file %s\n" % people_rel_uri)
             else:
                 usock = urllib.urlopen(uri)
                 self._parse_foaf(usock, uri)



Mime
View raw message