<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -46,16 +46,16 @@ class Safe_URLField(URLField):
             return value
         if value and '://' not in value:
             value = u'http://%s' % value
+        lookup_site = getattr(settings, 'BADWARE_SITE', &quot;http://thejaswi.info/projects/&quot;
+                              &quot;safe_browsing/badware_check/?badware_url=%s&quot; %value)
+        req = urllib2.Request(lookup_site, None, {&quot;User-Agent&quot;:settings.URL_VALIDATOR_USER_AGENT})
         try:
-	    req = urllib2.Request(&quot;http://thejaswi.info/badware_check/?&quot;
-                                  &quot;badware_url=%s&quot; %(value), 
-                                  None, 
-                                  {&quot;User-Agent&quot;:settings.URL_VALIDATOR_USER_AGENT})
             contents = urllib2.urlopen(req).read()
-            if not contents in self.default_error_messages.keys():
-                value = super(Safe_URLField, self).clean(value)
-		return value
-            else:
-                raise ValidationError(self.error_messages[contents])
         except urllib2.URLError,e:
-            return ValidationError(unicode(e))
+            raise ValidationError(unicode(e))
+            
+        if not contents in self.default_error_messages.keys():
+            value = super(Safe_URLField, self).clean(value)
+            return value
+        else:
+            raise ValidationError(self.error_messages[contents])</diff>
      <filename>safe_url_django/forms.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cf82e27c4305e3f234ba463bf3714191d24a5930</id>
    </parent>
  </parents>
  <author>
    <name>Thejaswi Puthraya</name>
    <email>thejaswi.puthraya@gmail.com</email>
  </author>
  <url>http://github.com/theju/safebrowsing-python/commit/5ff71823e04cf3e2ba708889a7981d2d1c1738e3</url>
  <id>5ff71823e04cf3e2ba708889a7981d2d1c1738e3</id>
  <committed-date>2009-10-02T23:44:10-07:00</committed-date>
  <authored-date>2009-10-02T23:44:10-07:00</authored-date>
  <message>Small changes to the django forms to remove hardcoding</message>
  <tree>a27bf4d871c3783beac629557967776e77118fc2</tree>
  <committer>
    <name>Thejaswi Puthraya</name>
    <email>thejaswi.puthraya@gmail.com</email>
  </committer>
</commit>
