Merge lp:~tpatil/nova/bug699654 into lp:~hudson-openstack/nova/trunk
- bug699654
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Vish Ishaya |
Approved revision: | 602 |
Merged at revision: | 620 |
Proposed branch: | lp:~tpatil/nova/bug699654 |
Merge into: | lp:~hudson-openstack/nova/trunk |
Diff against target: |
46 lines (+10/-8) 1 file modified
nova/api/ec2/__init__.py (+10/-8) |
To merge this branch: | bzr merge lp:~tpatil/nova/bug699654 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vish Ishaya (community) | Approve | ||
Devin Carlen (community) | Approve | ||
Jay Pipes | Pending | ||
Review via email: mp+47008@code.launchpad.net |
Commit message
Fix for LP Bug #699654
Description of the change
Fix for LP Bug #699654
Tushar Patil (tpatil) wrote : | # |
My mistake, I will make revert it back to audit.
Tushar Patil (tpatil) wrote : | # |
Please review and let me know your comments.
Tushar Patil (tpatil) wrote : | # |
Request to merge this branch into lp:nova if there are no more review comments.
OpenStack Infra (hudson-openstack) wrote : | # |
The attempt to merge lp:~tpatil/nova/bug699654 into lp:nova failed. Below is the output from the failed tests.
AdminAPITest
test_
test_
APITest
test_
Test
test_
test_
test_bad_token ok
test_bad_user ok
test_no_user ok
test_
TestLimiter
test_
TestFaults
test_
test_raise ok
test_
FlavorsTest
test_
test_
GlanceImageServ
test_create ok
test_
test_delete ok
test_update ok
ImageController
test_
test_
LocalImageServi
test_create ok
test_
test_delete ok
test_update ok
LimiterTest
test_minute ok
test_
test_second ok
test_
test_
WSGIAppProxyTest
test_200 ok
test_403 ok
test_failure ok
WSGIAppTest
test_escaping ok
test_good_urls ok
test_
test_
test_
ServersTest
test_
test_
test_
test_
test_
test_ge...
OpenStack Infra (hudson-openstack) wrote : | # |
The attempt to merge lp:~tpatil/nova/bug699654 into lp:nova failed. Below is the output from the failed tests.
AdminAPITest
test_
test_
APITest
test_
Test
test_
test_
test_bad_token ok
test_bad_user ok
test_no_user ok
test_
TestLimiter
test_
TestFaults
test_
test_raise ok
test_
FlavorsTest
test_
test_
GlanceImageServ
test_create ok
test_
test_delete ok
test_update ok
ImageController
test_
test_
LocalImageServi
test_create ok
test_
test_delete ok
test_update ok
LimiterTest
test_minute ok
test_
test_second ok
test_
test_
WSGIAppProxyTest
test_200 ok
test_403 ok
test_failure ok
WSGIAppTest
test_escaping ok
test_good_urls ok
test_
test_
test_
ServersTest
test_
test_
test_
test_
test_
test_ge...
Vish Ishaya (vishvananda) wrote : | # |
still has pep8 issues.
Vish
On Jan 25, 2011, at 3:24 PM, OpenStack Hudson wrote:
> The proposal to merge lp:~tpatil/nova/bug699654 into lp:nova has been updated.
>
> Status: Approved => Needs review
>
> For more details, see:
> https:/
> --
> https:/
> You are reviewing the proposed merge of lp:~tpatil/nova/bug699654 into lp:nova.
Tushar Patil (tpatil) wrote : | # |
I already check for pep8 errors and it returned me following
root@ubuntu-
./doc/ext/
./doc/ext/
./doc/ext/
./doc/ext/
./doc/ext/
./doc/ext/
./doc/ext/
./doc/ext/
./doc/ext/
./doc/ext/
./doc/source/
./doc/source/
./smoketests/
./tools/
./tools/
./tools/
I didn't see any issues reported in my code, so I was relaxed. But it seems like I need to first run merge, check pep8 for errors and then push the branch again.
Vish Ishaya (vishvananda) wrote : | # |
the command is pep8 --repeat nova bin/* (or just ./run_tests.sh) the bin files don't get picked up automatically because they don't end in .py
You also may have an old version of pep8
Vish
On Jan 25, 2011, at 3:38 PM, Tushar Patil wrote:
> I already check for pep8 errors and it returned me following
>
> root@ubuntu-
> ./doc/ext/
> ./doc/ext/
> ./doc/ext/
> ./doc/ext/
> ./doc/ext/
> ./doc/ext/
> ./doc/ext/
> ./doc/ext/
> ./doc/ext/
> ./doc/ext/
> ./doc/source/
> ./doc/source/
> ./smoketests/
> ./tools/
> ./tools/
> ./tools/
>
> I didn't see any issues reported in my code, so I was relaxed. But it seems like I need to first run merge, check pep8 for errors and then push the branch again.
> --
> https:/
> You are reviewing the proposed merge of lp:~tpatil/nova/bug699654 into lp:nova.
Vish Ishaya (vishvananda) wrote : | # |
vishvananda@
0.6.1
Tushar Patil (tpatil) wrote : | # |
I have correct pep8 version.
Now I can see the above error when I run the command pep8 -repeat nova bin/*
I will fix it soon. Sorry to bother you again and again.
I am learning lots of new things in this project. Will ensure this problem doesn't happen again.
Vish Ishaya (vishvananda) wrote : | # |
Don't worry about it. We're all learning.
Vish
On Jan 25, 2011, at 3:49 PM, Tushar Patil wrote:
> I have correct pep8 version.
> Now I can see the above error when I run the command pep8 -repeat nova bin/*
> I will fix it soon. Sorry to bother you again and again.
>
> I am learning lots of new things in this project. Will ensure this problem doesn't happen again.
>
>
> --
> https:/
> You are reviewing the proposed merge of lp:~tpatil/nova/bug699654 into lp:nova.
Vish Ishaya (vishvananda) wrote : | # |
As a side note, you might want to configure your editor to automatically strip white-space from the end of the lines on save.
- 602. By Tushar Patil
-
Fixed pep8 errors
Preview Diff
1 | === modified file 'Authors' |
2 | === modified file 'nova/api/ec2/__init__.py' |
3 | --- nova/api/ec2/__init__.py 2011-01-19 02:00:28 +0000 |
4 | +++ nova/api/ec2/__init__.py 2011-01-25 23:57:16 +0000 |
5 | @@ -170,7 +170,7 @@ |
6 | req.path) |
7 | # Be explicit for what exceptions are 403, the rest bubble as 500 |
8 | except (exception.NotFound, exception.NotAuthorized) as ex: |
9 | - LOG.audit(_("Authentication Failure: %s"), str(ex)) |
10 | + LOG.audit(_("Authentication Failure: %s"), ex.args[0]) |
11 | raise webob.exc.HTTPForbidden() |
12 | |
13 | # Authenticated! |
14 | @@ -314,17 +314,18 @@ |
15 | try: |
16 | result = api_request.invoke(context) |
17 | except exception.NotFound as ex: |
18 | - LOG.info(_('NotFound raised: %s'), str(ex), context=context) |
19 | - return self._error(req, context, type(ex).__name__, str(ex)) |
20 | + LOG.info(_('NotFound raised: %s'), ex.args[0], context=context) |
21 | + return self._error(req, context, type(ex).__name__, ex.args[0]) |
22 | except exception.ApiError as ex: |
23 | - LOG.exception(_('ApiError raised: %s'), str(ex), context=context) |
24 | + LOG.exception(_('ApiError raised: %s'), ex.args[0], |
25 | + context=context) |
26 | if ex.code: |
27 | - return self._error(req, context, ex.code, str(ex)) |
28 | + return self._error(req, context, ex.code, ex.args[0]) |
29 | else: |
30 | - return self._error(req, context, type(ex).__name__, str(ex)) |
31 | + return self._error(req, context, type(ex).__name__, ex.args[0]) |
32 | except Exception as ex: |
33 | extra = {'environment': req.environ} |
34 | - LOG.exception(_('Unexpected error raised: %s'), str(ex), |
35 | + LOG.exception(_('Unexpected error raised: %s'), ex.args[0], |
36 | extra=extra, context=context) |
37 | return self._error(req, |
38 | context, |
39 | @@ -347,7 +348,8 @@ |
40 | '<Response><Errors><Error><Code>%s</Code>' |
41 | '<Message>%s</Message></Error></Errors>' |
42 | '<RequestID>%s</RequestID></Response>' % |
43 | - (code, message, context.request_id)) |
44 | + (utils.utf8(code), utils.utf8(message), |
45 | + utils.utf8(context.request_id))) |
46 | return resp |
47 | |
48 |
20 - LOG.audit( _("Authenticati on Failure: %s"), str(ex)) _("Authenticati on Failure: %s"), ex.args[0])
21 + LOG.error(
Why was this changed from audit to error?