Issue 703066: os.utime can fail with TypeError (original) (raw)
Occasionally os.utime can fail with a TypeError:
python
Python 2.2.2 (#1, Dec 16 2002, 02:51:47) [GCC 3.2.1] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import os,time
os.utime("/backup/test/interhost/ace/.maildir-sent/cur/rdiff-backup.tmp.1980", ... (time.time(), 1038064008)); Traceback (most recent call last): File "", line 2, in ? TypeError: utime() arg 2 must be a tuple (atime, mtime)
if one of the elements in the time pair is a float and not a long. Strangely it seems to work sporadically. It may just be a documentation problem -- add a note in the docs saying longs are required, and then have the TypeError say:
TypeError: utime() arg 2 must be a tuple of longs (atime, mtime)