On Fri, 2012-04-13 at 13:46 -0400, Chris Evich wrote: > Signed-off-by: Chris Evich <cev...@redhat.com> > --- > client/tools/make_clean | 16 ++++++++++++++++ > 1 files changed, 16 insertions(+), 0 deletions(-) > > diff --git a/client/tools/make_clean b/client/tools/make_clean > index c8c0364..d0b339c 100755 > --- a/client/tools/make_clean > +++ b/client/tools/make_clean > @@ -7,6 +7,12 @@ def purge_src(top_dir): > for dir in os.listdir(top_dir): > if dir.startswith('.'): > continue > + envfile = os.path.join(top_dir, dir, 'env') > + try: > + os.unlink(envfile) > + print "Cleaned environment file %s" % envfile > + except OSError: > + pass # ignore non-existing files > py = os.path.join (top_dir, dir, dir + '.py') > if not os.path.exists(py): > continue > @@ -27,3 +33,13 @@ if os.path.isdir('tmp'): > > for dir in ['site_tests', 'site_profilers', 'tests', 'profilers', 'deps']: > purge_src(dir) > + > +for filename in ['/tmp/address_pool', '/tmp/address_pool.lock', > + '/tmp/kvm-autotest-vm-create.lock', > + '/tmp/libvirt-autotest-vm-create.lock', > + '/tmp/mac_lock']: > + try: > + os.unlink(filename) > + except OSError: > + continue > + print "Cleaned temporary file %s" % filename
^ The print statement has to go after os.unlink, otherwise it looks good to me. _______________________________________________ Autotest mailing list Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest