[Testbot] Plone 5.0 - Python 2.7 - Build # 2465 - Regression! - failure(s)

jenkins at plone.org jenkins at plone.org
Fri May 9 12:21:47 UTC 2014


-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 2465 - Failure!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-5.0-python-2.7/2465/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: plone.app.portlets
Branch: refs/heads/master
Date: 2014-05-09T14:20:55+02:00
Author: Johannes Raggam (thet) <raggam-nl at adm.at>
Commit: https://github.com/plone/plone.app.portlets/commit/3a9233b4294e6325ce0b11faa4e6ef3f1e5dda66

loose plone.app.event dependency.

Files changed:
M plone/app/portlets/__init__.py
M plone/app/portlets/utils.py

diff --git a/plone/app/portlets/__init__.py b/plone/app/portlets/__init__.py
index 985e571..f00663e 100644
--- a/plone/app/portlets/__init__.py
+++ b/plone/app/portlets/__init__.py
@@ -1,3 +1,12 @@
 # Import PloneMessageFactory to create messages in the plone domain
 from zope.i18nmessageid import MessageFactory
+import pkg_resources
+
 PloneMessageFactory = MessageFactory('plone')
+
+try:
+    pkg_resources.get_distribution('plone.app.event')
+except pkg_resources.DistributionNotFound:
+    HAS_PLONE_APP_EVENT = False
+else:
+    HAS_PLONE_APP_EVENT = True
diff --git a/plone/app/portlets/utils.py b/plone/app/portlets/utils.py
index e37b576..d1e8e40 100644
--- a/plone/app/portlets/utils.py
+++ b/plone/app/portlets/utils.py
@@ -25,9 +25,6 @@
 if HAS_PLONE_APP_EVENT:
     from plone.app.event.portlets import portlet_calendar as calendar
     from plone.app.event.portlets import portlet_events as events
-else:
-    from plone.app.portlets.portlets import events
-    from plone.app.portlets.portlets import calendar
 
 
 def assignment_mapping_from_key(context, manager_name, category, key, create=False):
@@ -88,10 +85,16 @@ def convert_legacy_portlets(context):
                        'portlet_recent': recent.Assignment(count=5),
                        'portlet_related': DONT_MIGRATE,
                        'portlet_languages': DONT_MIGRATE,
-                       'portlet_calendar': calendar.Assignment(),
-                       'portlet_events': events.Assignment(count=5),
+                       'portlet_calendar': DONT_MIGRATE,
+                       'portlet_events': DONT_MIGRATE,
                        }
 
+    if HAS_PLONE_APP_EVENT:
+        portletsMapping.update({
+            'portlet_calendar': calendar.Assignment(),
+            'portlet_events': events.Assignment(count=5),
+        })
+
     # Convert left_slots and right_slots to portlets
 
     left = getUtility(IPortletManager, name='plone.leftcolumn')




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 2309 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140509/34d0296d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 6831 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140509/34d0296d/attachment-0001.obj>


More information about the Testbot mailing list