patch from mpool to fix a python 2.5 warning: stat() returns floats for
times and we want to encode them as ints.
This commit is contained in:
Robey Pointer 2007-02-10 15:58:28 -08:00
parent 21a42f5f33
commit f384749a8c
1 changed files with 3 additions and 2 deletions

View File

@ -136,8 +136,9 @@ class SFTPAttributes (object):
if self._flags & self.FLAG_PERMISSIONS:
msg.add_int(self.st_mode)
if self._flags & self.FLAG_AMTIME:
msg.add_int(self.st_atime)
msg.add_int(self.st_mtime)
# throw away any fractional seconds
msg.add_int(long(self.st_atime))
msg.add_int(long(self.st_mtime))
if self._flags & self.FLAG_EXTENDED:
msg.add_int(len(self.attr))
for key, val in self.attr.iteritems():