From: jorgormo Date: Thu, 3 Jul 2008 13:44:58 +0000 (+0200) Subject: Always remove tmp file in melon-watch-dir X-Git-Url: http://slack.codemaniacs.com/git/?a=commitdiff_plain;h=2d4a8cb7fd4c6b169c2791aeb1dd1a70b74d3fde;p=melon.git Always remove tmp file in melon-watch-dir --- diff --git a/melon-watch-dir.py b/melon-watch-dir.py index 2063ab0..8ce1a16 100755 --- a/melon-watch-dir.py +++ b/melon-watch-dir.py @@ -46,7 +46,7 @@ try: outfile.write("!!%s&%s&%s&%s&%d!!\n"%(name, user, hostname, dirname+" "+str(count)+"/"+str(total), (100*count)/total)) outfile.flush() outfile.close() -except: +finally: if "NamedTemporaryFile" not in dir(tempfile): os.remove(outfilename)