diff options
author | Rick Harris <rconradharris@gmail.com> | 2013-02-01 23:23:20 +0000 |
---|---|---|
committer | Rick Harris <rconradharris@gmail.com> | 2013-02-04 19:02:46 +0000 |
commit | a38ae113e17466ab0bb6612888b619e80d52bc7f (patch) | |
tree | 69d1e61f8f6507377c5139c76d5523afc562aac5 /nova/utils.py | |
parent | e0747fffd74d11bddc5634b616a91eabdf4e12aa (diff) | |
download | nova-a38ae113e17466ab0bb6612888b619e80d52bc7f.tar.gz nova-a38ae113e17466ab0bb6612888b619e80d52bc7f.tar.xz nova-a38ae113e17466ab0bb6612888b619e80d52bc7f.zip |
Fix incorrect device name being raised.
`device` was being used as an index variable in a for-loop, overwriting
the value that was passed in, causing the in-use exception to point to
the wrong device.
The solution is to use a different variable name, in this case
`device_path` as the index variable.
Other cleanups include:
* Update to test to ensure exception message points to correct device
* Simplify for-loop by using set to collect letters, instead of a list
which is later turned into a set
* Added blank lines to improve readability in particularly dense
sections
* Made `req_letters` and `_get_unused_letters` singular because they, in
fact, are.
Change-Id: Iad33f7ff0c109c6cea5df84d54c11cee750bf19d
Diffstat (limited to 'nova/utils.py')
0 files changed, 0 insertions, 0 deletions