diff options
author | Robey Pointer <robey@lag.net> | 2007-02-10 15:58:28 -0800 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2007-02-10 15:58:28 -0800 |
commit | f384749a8c90f706394db6c64ba022998c9aa54c (patch) | |
tree | 50f239f5762bda8b8fb1e5a430c74137b3013cda | |
parent | 21a42f5f3388e91ca6dc4e91bf824dfc85fc7944 (diff) |
[project @ robey@lag.net-20070210235828-2a24iw2xqe4lnf42]
patch from mpool to fix a python 2.5 warning: stat() returns floats for
times and we want to encode them as ints.
-rw-r--r-- | paramiko/sftp_attr.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py index bdbda90d..adf46d2f 100644 --- a/paramiko/sftp_attr.py +++ b/paramiko/sftp_attr.py @@ -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(): |