Code review comment for lp:~oubiwann/txaws/416109-arbitrary-endpoints

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

> [1] Some flakes
> txaws/ec2/client.py:6: 'b64encode' imported but unused
> txaws/storage/client.py:10: 'b64encode' imported but unused
> txaws/storage/client.py:11: 'md5' imported but unused
> txaws/storage/client.py:18: 'AWSCredentials' imported but unused
> txaws/tests/test_credentials.py:6: 'TestCase' imported but unused

Fixed.

> [2]
> + try:
> + gtk2reactor.install()
> + except AssertionError:
> + pass
>
> Really? What's the reason behind this change?

I was getting errors in the unit tests without this. I've just commented it out, and run it again, but I'm not longer getting the errors. Dunno. Removed.

> [3]
> key_id = content.get_children()[0].get_children()[1].get_text()
> secret_key =
> content.get_children()[1].get_children()[1].get_text()
> creds = AWSCredentials(access_key=key_id, secret_key=secret_key)
> + region = AWSServiceRegion(creds=creds)
> self.create_client(creds)
> gnomekeyring.item_create_sync(
> None,
>
> This change seems unecessary.

Yup, it is. Removed.

> [4]
> +from twisted.web.client import _parse
>
> It's pretty sad, but you can't import that, it's private. You have to copy the
> function.

Copied this function and its unit tests from twisted.

> [5]
> + self.assertEquals(client1, client2)
> +
> +
> + def test_get_s3_client(self):
>
> There is an extra blank line here.

This was removed with the changes I made from Jamu's comments.

« Back to merge proposal