diff options
author | Jenkins <jenkins@review.openstack.org> | 2012-10-26 19:52:59 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2012-10-26 19:52:59 +0000 |
commit | 33825bea5bccab26542e0db649932ba8da3de27f (patch) | |
tree | b855831c99763e9d89055688bc35b0403744672e | |
parent | 1d8225bbb2d6c171ea5a393e0714a4f91ed6880d (diff) | |
parent | 88f252a3d4209c7912f6ff36a6f703ef38f2546b (diff) | |
download | nova-33825bea5bccab26542e0db649932ba8da3de27f.tar.gz nova-33825bea5bccab26542e0db649932ba8da3de27f.tar.xz nova-33825bea5bccab26542e0db649932ba8da3de27f.zip |
Merge "Fix hacking.py naivete regarding lines that look like imports"
-rwxr-xr-x | tools/hacking.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/hacking.py b/tools/hacking.py index 1c2e11218..4e42d3e89 100755 --- a/tools/hacking.py +++ b/tools/hacking.py @@ -105,7 +105,7 @@ def import_normalize(line): # convert "from x import y" to "import x.y" # handle "from x import y as z" to "import x.y as z" split_line = line.split() - if (line.startswith("from ") and "," not in line and + if ("import" in line and line.startswith("from ") and "," not in line and split_line[2] == "import" and split_line[3] != "*" and split_line[1] != "__future__" and (len(split_line) == 4 or |