bug with os.rename in 2.4.1?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Tue Apr 28 14:41:59 EDT 2009
En Tue, 28 Apr 2009 14:43:01 -0300, t123 <tom.lukes at gmail.com> escribió:
> It's running on solaris 9. Here is some of the code. It's actually
> at the beginning of the job. The files are ftp'd over. The first
> thing that happens is that the files get renamed before any processing
> of the file. And when it fails, it always fails at the first file,
> comm.dat. What I can't understand is why the inconsistent behavior.
>
> try:
> if os.path.exists(paths.xferin_dir+'/COMM.DAT'):
> os.rename(paths.xferin_dir+'/COMM.DAT',paths.xferin_dir+'/
> COMM.DAT'+'.0')
> if os.path.exists(paths.xferin_dir+'/DESC.DAT'):
> os.rename(paths.xferin_dir+'/DESC.DAT',paths.xferin_dir+'/
> DESC.DAT'+'.0')
> if os.path.exists(paths.xferin_dir+'/HEADER.DAT'):
> os.rename(paths.xferin_dir+'/HEADER.DAT',paths.xferin_dir+'/
> HEADER.DAT'+'.0')
> if os.path.exists(paths.xferin_dir+'/LINE.DAT'):
> os.rename(paths.xferin_dir+'/LINE.DAT',paths.xferin_dir+'/
> LINE.DAT'+'.0')
>
> except:
> print "Unexpected error:", sys.exc_info()[0]
> raise
And the error is...?
--
Gabriel Genellina
More information about the Python-list
mailing list