Portable exception to avoid syntax error message
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla |
Fix Released
|
Low
|
Hengqing Hu |
Bug Description
Every time I open ansible/
ansible/
Checking other files, they all use 'as' keyword for exception:
grep -r "except.*as.*" *
docker/
docker/
According to Python 3 Porting guide
http://
Exceptions were changed in a few ways for Python 3. First, strings
are no longer usable as exceptions. Additionally, the raise syntax no
longer accepts comma-separated arguments, instead working with exception
instances. Perhaps the largest difference in Python 3 is that exception
objects are only available via the as keyword, which was introduced in 2.6.
Changed in kolla: | |
assignee: | nobody → Hengqing Hu (hudayou) |
Changed in kolla: | |
status: | New → Triaged |
importance: | Undecided → Low |
milestone: | none → liberty-3 |
Changed in kolla: | |
status: | Triaged → In Progress |
Changed in kolla: | |
status: | Fix Committed → Fix Released |
Reviewed: https:/ /review. openstack. org/218757 /git.openstack. org/cgit/ stackforge/ kolla/commit/ ?id=1dab839de49 be7ef92f274416b 417b2007c1d9bd
Committed: https:/
Submitter: Jenkins
Branch: master
commit 1dab839de49be7e f92f274416b417b 2007c1d9bd
Author: Hengqing Hu <email address hidden>
Date: Mon Aug 31 15:58:13 2015 +0800
Expose exception objects via the as keyword
According to Python 3 Porting guide docs.pythonspri nts.com/ python3_ porting/ py-porting. html
http://
Exceptions were changed in a few ways for Python 3. First, strings
are no longer usable as exceptions. Additionally, the raise syntax no
longer accepts comma-separated arguments, instead working with exception
instances. Perhaps the largest difference in Python 3 is that exception
objects are only available via the as keyword, which was introduced in
2.6.
Change-Id: Ide665ecc4b7f14 bd58bafab47e05a 86a4cf2d141
Closes-Bug: #1490526