[Python-bugs-list] [ python-Bugs-703066 ] os.utime can fail with TypeError

SourceForge.net noreply@sourceforge.net
Thu, 22 May 2003 14:39:02 -0700


Bugs item #703066, was opened at 2003-03-13 11:40
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=703066&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Ben Escoto (bescoto)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.utime can fail with TypeError

Initial Comment:
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 "<stdin>", 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)

----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2003-05-22 17:39

Message:
Logged In: YES 
user_id=33168

Ben, I can't reproduce this problem with 2.2.3 or 2.3.  Can
you verify this is still a problem?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=703066&group_id=5470