[quills-dev] [Collective-checkins] r49551 - quills.remoteblogging/trunk/quills/remoteblogging/browser
quills-dev at lists.etria.com quills-dev at lists.etria.comTue Sep 18 21:43:16 UTC 2007
- Previous message: [quills-dev] [Quills Issue Tracker] Response to #99 - quills.remoteblogging should not import from zope 2
- Next message: [quills-dev] [Collective-checkins] r49551 - quills.remoteblogging/trunk/quills/remoteblogging/browser
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: tomster
Date: Tue Sep 18 21:43:16 2007
New Revision: 49551
Modified:
quills.remoteblogging/trunk/quills/remoteblogging/browser/metaweblogapi.py
Log:
removed oooold hack (that i introduced myself at the time) that provided a workaround for a temporary implementation weirdness in Zope 2.9's xmlrpc lib. that workaround included a dependency on DateTime, now (with Zope 2.10) we can just pass the value from xmlrpc lib unchanged and thus avoid any explicit dependency on DateTime.
Modified: quills.remoteblogging/trunk/quills/remoteblogging/browser/metaweblogapi.py
==============================================================================
--- quills.remoteblogging/trunk/quills/remoteblogging/browser/metaweblogapi.py (original)
+++ quills.remoteblogging/trunk/quills/remoteblogging/browser/metaweblogapi.py Tue Sep 18 21:43:16 2007
@@ -115,14 +115,12 @@
def getUsersBlogs(self, appkey, username, password):
"""See IMetaWeblogAPI.
"""
- app = IUIDManager(self.context).getByUID(appkey)
- return IUserManager(app).getWeblogsForUser(username)
+ return IUserManager(self.context).getWeblogsForUser(username)
def getUserInfo(self, appkey, username, password):
"""See IMetaWeblogAPI.
"""
- app = IUIDManager(self.context).getByUID(appkey)
- return IUserManager(app).getUserInfo(username)
+ return IUserManager(self.context).getUserInfo(username)
def entryStruct(self, entry):
"""See IMetaWeblogAPI.
@@ -213,17 +211,5 @@
"""Extract the effective date from the struct, or return a default
value.
"""
- ed = struct.get('pubdate', struct.get('datecreated'))
- # Due to strange developments in Zope2.9 resp. xmlrpclib we need to parse
- # the XMLRPC-DateTime object's string representation and then construct a
- # 'proper' DateTime instance from a string assembled from those parsed bits.
- try:
- val = ed.value
- datetime_string = "%s-%s-%s%s" % (val[0:4], val[4:6], val[6:8], val[8:])
- return datetime.datetime(datetime_string)
- except AttributeError:
- # We obviously didn't receive a xmlrpclib DateTime instance, so we
- # can return the default unchanged (as it already is a datetime
- # instance):
- return ed
+ return struct.get('pubdate', struct.get('datecreated', None))
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Collective-checkins mailing list
Collective-checkins at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/collective-checkins
- Previous message: [quills-dev] [Quills Issue Tracker] Response to #99 - quills.remoteblogging should not import from zope 2
- Next message: [quills-dev] [Collective-checkins] r49551 - quills.remoteblogging/trunk/quills/remoteblogging/browser
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the quills-dev mailing list