summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorDan Smith <danms@us.ibm.com>2012-10-26 11:39:46 -0700
committerDan Smith <danms@us.ibm.com>2012-10-26 11:39:46 -0700
commit88f252a3d4209c7912f6ff36a6f703ef38f2546b (patch)
treefa56ed1f311d781ee59d4b2c67f972558b90683d /nova/utils.py
parent50a0f3efb6cc4ae9c94439eea346828d35080d6c (diff)
downloadnova-88f252a3d4209c7912f6ff36a6f703ef38f2546b.tar.gz
nova-88f252a3d4209c7912f6ff36a6f703ef38f2546b.tar.xz
nova-88f252a3d4209c7912f6ff36a6f703ef38f2546b.zip
Fix hacking.py naivete regarding lines that look like imports
Right now, any line that starts with "from" (after whitespace removal) is considered an import line. That assumption leads to some unsavory parsing and crashing if the line doesn't match the expected format. This patch checks to make sure that the word "import" is in the line as well as starting with "from", which at least gets us a bit closer to a reasonable assumption. Fixes bug 1071849 Change-Id: Iab666fcd04a9aaa3a490737a173ee3189b9b8329
Diffstat (limited to 'nova/utils.py')
0 files changed, 0 insertions, 0 deletions