Fix hacking.py naivete regarding lines that look like imports
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

maelnor/nova,OpenAcademy-OpenStack/nova-scheduler,fajoy/nova,ruslanloman/nova,jianghuaw/nova,sridevikoushik31/nova,BeyondTheClouds/nova,cernops/nova,leilihh/novaha,mgagne/nova,adelina-t/nova,zzicewind/nova,mandeepdhami/nova,sacharya/nova,dawnpower/nova,dawnpower/nova,phenoxim/nova,leilihh/nova,DirectXMan12/nova-hacking,aristanetworks/arista-ovs-nova,jeffrey4l/nova,nikesh-mahalka/nova,CCI-MOC/nova,joker946/nova,rajalokan/nova,edulramirez/nova,tanglei528/nova,eharney/nova,redhat-openstack/nova,cloudbase/nova-virtualbox,saleemjaveds/https-github.com-openstack-nova,Yusuke1987/openstack_template,redhat-openstack/nova,bgxavier/nova,badock/nova,mgagne/nova,rrader/nova-docker-plugin,BeyondTheClouds/nova,iuliat/nova,kimjaejoong/nova,leilihh/novaha,eayunstack/nova,maoy/zknova,openstack/nova,shahar-stratoscale/nova,yrobla/nova,klmitch/nova,nikesh-mahalka/nova,double12gzh/nova,ewindisch/nova,sridevikoushik31/openstack,yosshy/nova,cernops/nova,TieWei/nova,aristanetworks/arista-ovs-nova,Juniper/nova,noironetworks/nova,cyx1231st/nova,alexandrucoman/vbox-nova-driver,petrutlucian94/nova_dev,isyippee/nova,Metaswitch/calico-nova,bclau/nova,gooddata/openstack-nova,devoid/nova,gspilio/nova,dstroppa/openstack-smartos-nova-grizzly,tangfeixiong/nova,yrobla/nova,felixma/nova,mahak/nova,petrutlucian94/nova_dev,devendermishrajio/nova,apporc/nova,viggates/nova,TieWei/nova,sridevikoushik31/openstack,barnsnake351/nova,blueboxgroup/nova,mikalstill/nova,scripnichenko/nova,j-carpentier/nova,joker946/nova,devendermishrajio/nova,dims/nova,dstroppa/openstack-smartos-nova-grizzly,rahulunair/nova,thomasem/nova,mandeepdhami/nova,bigswitch/nova,isyippee/nova,JioCloud/nova_test_latest,varunarya10/nova_test_latest,tudorvio/nova,plumgrid/plumgrid-nova,tangfeixiong/nova,LoHChina/nova,JianyuWang/nova,fajoy/nova,cloudbase/nova,eonpatapon/nova,bigswitch/nova,double12gzh/nova,eonpatapon/nova,alaski/nova,rahulunair/nova,vmturbo/nova,eayunstack/nova,citrix-openstack-build/nova,sridevikoushik31/nova,spring-week-topos/nova-week,CEG-FYP-OpenStack/scheduler,viggates/nova,imsplitbit/nova,DirectXMan12/nova-hacking,rajalokan/nova,maheshp/novatest,OpenAcademy-OpenStack/nova-scheduler,gspilio/nova,sebrandon1/nova,rickerc/nova_audit,qwefi/nova,akash1808/nova,sridevikoushik31/nova,ted-gould/nova,sebrandon1/nova,apporc/nova,tealover/nova,orbitfp7/nova,vladikr/nova_drafts,alaski/nova,CloudServer/nova,SUSE-Cloud/nova,zzicewind/nova,hanlind/nova,BeyondTheClouds/nova,petrutlucian94/nova,mikalstill/nova,adelina-t/nova,projectcalico/calico-nova,TwinkleChawla/nova,yrobla/nova,rajalokan/nova,NeCTAR-RC/nova,MountainWei/nova,silenceli/nova,TwinkleChawla/nova,bgxavier/nova,petrutlucian94/nova,JioCloud/nova,aristanetworks/arista-ovs-nova,plumgrid/plumgrid-nova,whitepages/nova,Metaswitch/calico-nova,Francis-Liu/animated-broccoli,takeshineshiro/nova,rrader/nova-docker-plugin,houshengbo/nova_vmware_compute_driver,akash1808/nova,Yusuke1987/openstack_template,gooddata/openstack-nova,spring-week-topos/nova-week,luogangyi/bcec-nova,Yuriy-Leonov/nova,zaina/nova,Stavitsky/nova,LoHChina/nova,devendermishrajio/nova_test_latest,dstroppa/openstack-smartos-nova-grizzly,noironetworks/nova,shail2810/nova,klmitch/nova,mikalstill/nova,houshengbo/nova_vmware_compute_driver,Juniper/nova,openstack/nova,scripnichenko/nova,affo/nova,ewindisch/nova,tianweizhang/nova,SUSE-Cloud/nova,jianghuaw/nova,shootstar/novatest,ntt-sic/nova,shahar-stratoscale/nova,devendermishrajio/nova_test_latest,yatinkumbhare/openstack-nova,belmiromoreira/nova,cloudbase/nova,dims/nova,tealover/nova,klmitch/nova,affo/nova,Francis-Liu/animated-broccoli,openstack/nova,watonyweng/nova,iuliat/nova,JianyuWang/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,gooddata/openstack-nova,maoy/zknova,CloudServer/nova,akash1808/nova_test_latest,Triv90/Nova,ruslanloman/nova,alvarolopez/nova,leilihh/nova,belmiromoreira/nova,yosshy/nova,virtualopensystems/nova,sebrandon1/nova,CiscoSystems/nova,varunarya10/nova_test_latest,zhimin711/nova,Triv90/Nova,Juniper/nova,citrix-openstack-build/nova,cernops/nova,CiscoSystems/nova,DirectXMan12/nova-hacking,cyx1231st/nova,badock/nova,j-carpentier/nova,MountainWei/nova,fnordahl/nova,akash1808/nova_test_latest,jianghuaw/nova,cloudbau/nova,Triv90/Nova,mahak/nova,blueboxgroup/nova,fnordahl/nova,fajoy/nova,edulramirez/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,CCI-MOC/nova,maheshp/novatest,watonyweng/nova,maoy/zknova,eharney/nova,cloudbase/nova,Stavitsky/nova,JioCloud/nova_test_latest,vmturbo/nova,phenoxim/nova,bclau/nova,orbitfp7/nova,mmnelemane/nova,maelnor/nova,felixma/nova,Juniper/nova,gspilio/nova,raildo/nova,luogangyi/bcec-nova,zaina/nova,sridevikoushik31/openstack,vmturbo/nova,projectcalico/calico-nova,thomasem/nova,sacharya/nova,virtualopensystems/nova,vmturbo/nova,rahulunair/nova,alexandrucoman/vbox-nova-driver,tudorvio/nova,jeffrey4l/nova,rajalokan/nova,cloudbau/nova,cloudbase/nova-virtualbox,yatinkumbhare/openstack-nova,imsplitbit/nova,ted-gould/nova,zhimin711/nova,angdraug/nova,devoid/nova,klmitch/nova,houshengbo/nova_vmware_compute_driver,gooddata/openstack-nova,rickerc/nova_audit,ntt-sic/nova,kimjaejoong/nova,NeCTAR-RC/nova,berrange/nova,CEG-FYP-OpenStack/scheduler,JioCloud/nova,mmnelemane/nova,takeshineshiro/nova,sridevikoushik31/nova,barnsnake351/nova,tanglei528/nova,angdraug/nova,silenceli/nova,tianweizhang/nova,raildo/nova,shootstar/novatest,qwefi/nova,jianghuaw/nova,maheshp/novatest,hanlind/nova,Yuriy-Leonov/nova,alvarolopez/nova,berrange/nova,hanlind/nova,whitepages/nova,shail2810/nova,Tehsmash/nova,Tehsmash/nova,vladikr/nova_drafts,saleemjaveds/https-github.com-openstack-nova,mahak/nova