From fd6b0505ac29ae1371d062331bb32509f6e638ab Mon Sep 17 00:00:00 2001 From: dbr Date: Sat, 1 Nov 2008 15:07:02 +1030 Subject: [PATCH] Fixed typo in info message, fixed file moving and error handling --- autoPathTv.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoPathTv.py b/autoPathTv.py index dfb523a..e107567 100755 --- a/autoPathTv.py +++ b/autoPathTv.py @@ -193,10 +193,10 @@ def main(): print "[!] File already exists, not copying" else: if same_partition(oldfile, newpath): - print "[* Moving file]" + print "[*] Moving file" try: - shutil.rename(oldfile, newpath) - except: + shutil.move(oldfile, newpath) + except Exception, errormsg: print "[!] Error moving file! %s" % (errormsg) #end try else: