comparison gcp @ 49:7b303c41b273

removed bad fd close
author Goffi <goffi@goffi.org>
date Sat, 04 Jun 2011 21:23:06 +0200
parents 99da6ef26d26
children b0c96e4ab9d8
comparison
equal deleted inserted replaced
48:d26ffbbcbdad 49:7b303c41b273
315 source_fd = open(source_file, 'rb') 315 source_fd = open(source_file, 'rb')
316 except: 316 except:
317 self.journal.copyFailed() 317 self.journal.copyFailed()
318 self.journal.error("can't open source") 318 self.journal.error("can't open source")
319 self.journal.closeFile() 319 self.journal.closeFile()
320 source_fd.close()
321 return True 320 return True
322 filename = os.path.basename(source_file) 321 filename = os.path.basename(source_file)
323 assert(filename) 322 assert(filename)
324 dest_file = self.__filename_fix(options.dest_file,options) if options.dest_file else self.__filename_fix(os.path.join(dest_path,filename),options) 323 dest_file = self.__filename_fix(options.dest_file,options) if options.dest_file else self.__filename_fix(os.path.join(dest_path,filename),options)
325 if os.path.exists(dest_file) and not options.force: 324 if os.path.exists(dest_file) and not options.force: