Skip to content.

Etria Lists

 

[quills-dev] [Collective-checkins] r49551 - quills.remoteblogging/trunk/quills/remoteblogging/browser

Tom Lazar tom at tomster.org
Wed Sep 19 09:08:23 UTC 2007


On Sep 19, 2007, at 10:58 AM, Tim Hicks wrote:

>> 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)
> Yes, as you suspected in your tracker message, this part of your  
> change
> caught my eye.  Can you give the rationale for the change?

sure. the reason was that the getUsersBlogs and getUserInfo both  
attempted to first fetch an object with a UID of appkey. this uid  
however never existed in any of the cases that i tested. as per  
specification of metaweblog API this mechanism is intended to  
discover *all* blogs (of a given user) at a given url.

actually, i'm not sure, what the previous implementation did. i also  
don't know how the client acquires the 'appkey' that it provides.

specifically, this behaviour meant that the 'ecto' client no longer  
worked because it first calls getUsersBlogs and then getUserInfo and  
they both raised an exception (because there was no object with a UID  
of what ecto supplied -- it was a longish hexstring, but not in UID  
format).

my approach was to say that we don't support returning multiple blog  
instances (i'm not sure it makes sense, anyway: if i provide a url to  
a specifc blog instance why would i want the instance of another blog  
offered, as well? if a want the other blog, i just provide its url  
directly) so the loss of functionality isn't really that great.  
additionally, that functionality wasn't even tested or known to work.

long story short: with the changes above ecto (and probably some  
other clients, too) work again. before that they didn't.

whew ;-)

>
> Tim
>



More information about the quills-dev mailing list