Commit 5b33d3a3 authored by juga  's avatar juga
Browse files

Add method to remove latest link

parent ed520c48
......@@ -842,6 +842,17 @@ class V3BWFile(object):
ys = [[getattr(l, k) for l in self.bw_lines] for k in attrs]
return x, ys, attrs
def rm_link(self, output):
""""""
out_dir = os.path.dirname(output)
out_link = os.path.join(out_dir, 'latest.v3bw')
log.info('Removing %s link.', output)
with DirectoryLock(out_dir):
try:
os.unlink(out_link)
except FileNotFoundError:
pass
def write(self, output):
if output == '/dev/stdout':
log.info("Writing to stdout is not supported.")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment