Changeset 05e8da8


Ignore:
Timestamp:
Jun 22, 2010 6:38:07 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
2b6e64d1
Parents:
9e38ded
Message:

cleanup on failure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    r9e38ded r05e8da8  
    12211221                if self.state_filename: self.write_state()
    12221222                self.state_lock.release()
     1223                # Remove the repo dir
     1224                self.remove_dirs("%s/%s" %(self.repodir, expid))
     1225                # Walk up tmpdir, deleting as we go
     1226                if self.cleanup:
     1227                    self.remove_dirs(tmpdir)
     1228                else:
     1229                    log.debug("[start_experiment]: not removing %s" % tmpdir)
     1230
    12231231
    12241232                log.error("Swap in failed on %s" % ",".join(failed))
     
    12401248        # Walk up tmpdir, deleting as we go
    12411249        if self.cleanup:
    1242             log.debug("[start_experiment]: removing %s" % tmpdir)
    1243             for path, dirs, files in os.walk(tmpdir, topdown=False):
    1244                 for f in files:
    1245                     os.remove(os.path.join(path, f))
    1246                 for d in dirs:
    1247                     os.rmdir(os.path.join(path, d))
    1248             os.rmdir(tmpdir)
     1250            self.remove_dirs(tmpdir)
    12491251        else:
    12501252            log.debug("[start_experiment]: not removing %s" % tmpdir)
Note: See TracChangeset for help on using the changeset viewer.