[ckan-changes] commit/ckan: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Wed Aug 24 10:37:13 UTC 2011


2 new changesets in ckan:

http://bitbucket.org/okfn/ckan/changeset/848554af8e13/
changeset:   848554af8e13
branch:      defect-1172-exceptions
user:        dread
date:        2011-08-24 12:36:12
summary:     [lib]: Removed raise again by mistake.
affected #:  1 file (13 bytes)

--- a/ckan/lib/search/worker.py	Tue Aug 23 17:41:14 2011 +0100
+++ b/ckan/lib/search/worker.py	Wed Aug 24 11:36:12 2011 +0100
@@ -26,7 +26,7 @@
             log.warn("Unknown operation: %s" % operation)
     except Exception, ex:
         log.exception(ex)
-
+        raise
 
 class SynchronousSearchPlugin(SingletonPlugin):
 


http://bitbucket.org/okfn/ckan/changeset/898202fb9eb5/
changeset:   898202fb9eb5
user:        dread
date:        2011-08-24 12:37:01
summary:     [merge] from defect-1172-exceptions.
affected #:  6 files (457 bytes)

--- a/ckan/lib/cli.py	Mon Aug 22 18:53:13 2011 +0100
+++ b/ckan/lib/cli.py	Wed Aug 24 11:37:01 2011 +0100
@@ -38,9 +38,7 @@
             msg = 'No config file supplied'
             raise self.BadCommand(msg)
         self.filename = os.path.abspath(self.options.config)
-        try:
-            fileConfig(self.filename)
-        except Exception: pass
+        fileConfig(self.filename)
         conf = appconfig('config:' + self.filename)
         load_environment(conf.global_conf, conf.local_conf)
 


--- a/ckan/lib/search/worker.py	Mon Aug 22 18:53:13 2011 +0100
+++ b/ckan/lib/search/worker.py	Wed Aug 24 11:37:01 2011 +0100
@@ -26,7 +26,7 @@
             log.warn("Unknown operation: %s" % operation)
     except Exception, ex:
         log.exception(ex)
-
+        raise
 
 class SynchronousSearchPlugin(SingletonPlugin):
 


--- a/ckan/model/modification.py	Mon Aug 22 18:53:13 2011 +0100
+++ b/ckan/model/modification.py	Wed Aug 24 11:37:01 2011 +0100
@@ -1,3 +1,5 @@
+import logging
+
 from vdm.sqlalchemy import State
 
 from sqlalchemy.orm import object_session
@@ -14,6 +16,7 @@
 from ckan.model.package_extra import PackageExtra
 from ckan.model.tag import PackageTag
 
+log = logging.getLogger(__name__)
 
 class DomainObjectModificationExtension(SingletonPlugin, ObserverNotifier):
     """
@@ -63,4 +66,10 @@
 
     def notify(self, entity, operation):
         for observer in self.observers:
-            observer.notify(entity, operation)
+            try:
+                observer.notify(entity, operation)
+            except Exception, ex:
+                log.exception(ex)
+                # We reraise all exceptions so they are obvious there
+                # is something wrong
+                raise


--- a/ckan/model/package.py	Mon Aug 22 18:53:13 2011 +0100
+++ b/ckan/model/package.py	Wed Aug 24 11:37:01 2011 +0100
@@ -333,13 +333,13 @@
         return [(l.title, l.id) for l in register.values()]
 
     def get_license(self):
-        license = None
         if self.license_id:
             try:
                 license = self.get_license_register()[self.license_id]
-            except Exception, inst:
-                # Todo: Log a warning.
-                pass
+            except KeyError:
+                license = None
+        else:
+            license = None
         return license
 
     def set_license(self, license):


--- a/ckan/plugins/interfaces.py	Mon Aug 22 18:53:13 2011 +0100
+++ b/ckan/plugins/interfaces.py	Wed Aug 24 11:37:01 2011 +0100
@@ -167,7 +167,7 @@
 
 class IDomainObjectModification(Interface):
     """
-    Receives notification of new, changed and deleted domain objects
+    Receives notification of new, changed and deleted domain objects.
     """
 
     def notify(self, entity, operation):


--- a/ckan/tests/models/test_changeset.py	Mon Aug 22 18:53:13 2011 +0100
+++ b/ckan/tests/models/test_changeset.py	Wed Aug 24 11:37:01 2011 +0100
@@ -10,6 +10,10 @@
 import ckan.model as model
 from ckan.model import setup_default_user_roles
 
+# Changesets deprecated - tests skipped (see #1002)
+from nose.plugins.skip import SkipTest
+raise SkipTest()
+
 class TestCase(object):
 
     def setup(self):

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list