On 09/30/2016 04:06 PM, Ihar Hrachyshka wrote: > Ihar Hrachyshka <ihrac...@redhat.com> wrote: > >> Hi all, >> >> today we landed https://review.openstack.org/#/c/269658/ (huge!) that >> removed neutron/objects/network/ directory and replaced it with >> neutron/objects/network.py file. Though it makes python that sees old >> .pyc files sad: >> >> Failed to import test module: neutron.tests.unit.objects.test_network >> Traceback (most recent call last): >> File >> "/home/vagrant/git/neutron/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", >> line 456, in _find_test_path >> module = self._get_module_from_name(name) >> File >> "/home/vagrant/git/neutron/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", >> line 395, in _get_module_from_name >> __import__(name) >> File "neutron/tests/unit/objects/test_network.py", line 23, in >> <module> >> obj_test_base.BaseObjectIfaceTestCase): >> File "neutron/tests/unit/objects/test_network.py", line 24, in >> NetworkPortSecurityIfaceObjTestCase >> _test_class = network.NetworkPortSecurity >> AttributeError: 'module' object has no attribute 'NetworkPortSecurity' >> The test run didn't actually run any tests >> >> Please run git clean -f -x in your checkout to remove all .pyc files. >> This should solve any import issues you may experience due to the new >> patch. > > I hear that -f -x is not enough. Please add -d too: > > $ git clean -f -x -d > > Ihar >
Isn't ``find . -name \*.pyc -delete`` enough? That way you won't remove anything else. In Cinder we have that in tox.ini [1]. [1] https://github.com/openstack/cinder/blob/792108f771607b75a25e9c4cfaaa26e5039d1748/tox.ini#L21-L21 __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev