From 74f62c891da06727778f2ecc81c353c1955fd6e3 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Fri, 30 Nov 2012 08:38:52 +0000 Subject: [PATCH] slightly safer file closing strategy --- processing/post/deleteInfo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/processing/post/deleteInfo.py b/processing/post/deleteInfo.py index d7a68bb1b..c7b8a94c7 100755 --- a/processing/post/deleteInfo.py +++ b/processing/post/deleteInfo.py @@ -28,7 +28,7 @@ class extendableOption(Option): # -------------------------------------------------------------------- parser = OptionParser(option_class=extendableOption, usage='%prog [file[s]]', description = """ -Remove info from table head +Remove info lines from given ASCIItable(s). """ + string.replace('$Id$','\n','\\n') ) @@ -68,7 +68,7 @@ for file in files: outputAlive and table.output_flush() # just in case of buffered ASCII table - file['input'].close() # close input ASCII table if file['name'] != 'STDIN': + file['input'].close() # close input ASCII table file['output'].close() # close output ASCII table os.rename(file['name']+'_tmp',file['name']) # overwrite old one with tmp new