Not sure how this relates to your other MP, I'll consider you've addressed the TODO there for this review.
60 - lockname = bundle.data.get('lockname')
\o/ no more lock ;)
79 + if type(state) != int:
O_o can you add a comment to explain ? As I read it it means we'll be ignoring some requests. I'd rather error out unless you have a strong reason to do so... which will make a perfect comment ;)
118 +def lp_collection(url):
You probably want to talk to wgrant about that. If I remember correctly, if the collection is big/huge, you'll run into timeouts and will need to make several requests to acquire parts of the collection.
So better check with wgrant first if you're under a reasonable size for the collection or if you already need to handle chunks.
21 +# Read for details: https:/ /help.launchpad .net/API/ SigningRequests
22 +OAUTH_CONSUMER_KEY = 'TODO'
23 +OAUTH_TOKEN = 'TODO'
24 +OAUTH_TOKEN_SECRET = 'TODO'
25 +
Not sure how this relates to your other MP, I'll consider you've addressed the TODO there for this review.
60 - lockname = bundle. data.get( 'lockname' )
\o/ no more lock ;)
79 + if type(state) != int:
O_o can you add a comment to explain ? As I read it it means we'll be ignoring some requests. I'd rather error out unless you have a strong reason to do so... which will make a perfect comment ;)
118 +def lp_collection(url):
You probably want to talk to wgrant about that. If I remember correctly, if the collection is big/huge, you'll run into timeouts and will need to make several requests to acquire parts of the collection.
So better check with wgrant first if you're under a reasonable size for the collection or if you already need to handle chunks.
138 + 'OAuth realm="https:/ /api.launchpad. net/"', version= "1.0"', consumer_ key="%s" ' % settings. OAUTH_CONSUMER_ KEY, OAUTH_TOKEN, signature_ method= "PLAINTEXT" ', signature= "%%26%s" ' % settings. OAUTH_TOKEN_ SECRET, timestamp= "%d"' % int(oauth. time.time( )), nonce() ,
139 + 'oauth_
140 + 'oauth_
141 + 'oauth_token="%s"' % settings.
142 + 'oauth_
143 + 'oauth_
144 + 'oauth_
145 + 'oauth_nonce="%s"' % oauth.generate_
Great, we already have 3 settings parametrized, I think we also want OAuth realm so we can test against staging or a local launchpad.
161 + url = 'https:/ /api.launchpad. net/1.0/ ~%s/+archive/ %s/?ws. op='
That one probably needs to be parametrized in the same way.
223 + # TODO check for oauth before launching
Sounds like a good test to add ;)
249 + logging. exception( 'unable to request clean ppa, will retry')
Better add the exception encountered if only to start learning about which ones exist.
266 + logging. exception( 'error checking if ppa is clean')
idem
354 - # TODO test if this is needed or if there is some type
355 - # of looping logic needed
Yeah, see above, not sure you're talking about the same looping logic but that matches what I'm talking about ;)
364 logging. exception( 'Could not populate PPAs from launchpad')
Again, mention the exception, the logs are for us and we want precise info ;)
By just reading the proposal, this seems better than the previous version, so +once the tweaks above are addressed ;)