Mercurial > treepkg
changeset 110:ba677506e95e
Remove StatusFile. It has been superseded by the treepkg.util module
long ago.
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Wed, 19 Mar 2008 15:00:54 +0000 |
parents | fbfa1abb47f1 |
children | 7f6fb8103db0 |
files | treepkg/util.py |
diffstat | 1 files changed, 1 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/treepkg/util.py Tue Mar 04 14:59:39 2008 +0000 +++ b/treepkg/util.py Wed Mar 19 15:00:54 2008 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2007 by Intevation GmbH +# Copyright (C) 2007, 2008 by Intevation GmbH # Authors: # Bernhard Herzog <bh@intevation.de> # @@ -114,25 +114,3 @@ finally: if os.path.exists(tempname): os.remove(tempname) - - -class StatusFile(object): - - def __init__(self, filename): - assert os.path.isabs(filename) - self.filename = filename - - def read(self): - f = open(self.filename) - try: - self.status = f.read() - finally: - f.close() - - def set(self, status, extra=""): - ensure_directory(os.path.dirname(self.filename)) - writefile(self.filename, status + "\n" + extra) - - def get(self): - self.read() - return self.status.strip()