summaryrefslogtreecommitdiff
path: root/paramiko/sftp_attr.py
diff options
context:
space:
mode:
authorScott Maxwell <scott@codecobblers.com>2013-10-30 17:14:52 -0700
committerScott Maxwell <scott@codecobblers.com>2013-10-30 17:14:52 -0700
commit0b7d0cf0a23e4f16f8552ae05a66539119e2e920 (patch)
tree2ba26a535dceb8b2684adedae99fdbc4c77b3a67 /paramiko/sftp_attr.py
parent2d738fa08b85c5065cc898d5f9e4d36ee753e871 (diff)
downloadparamiko-0b7d0cf0a23e4f16f8552ae05a66539119e2e920.tar.gz
Convert and detect types properly, use helper constants, use StringIO and range
Diffstat (limited to 'paramiko/sftp_attr.py')
-rw-r--r--paramiko/sftp_attr.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py
index 84c83929..5a40f4c5 100644
--- a/paramiko/sftp_attr.py
+++ b/paramiko/sftp_attr.py
@@ -44,7 +44,7 @@ class SFTPAttributes (object):
FLAG_UIDGID = 2
FLAG_PERMISSIONS = 4
FLAG_AMTIME = 8
- FLAG_EXTENDED = 0x80000000L
+ FLAG_EXTENDED = x80000000
def __init__(self):
"""
@@ -194,13 +194,13 @@ class SFTPAttributes (object):
ks = 's'
else:
ks = '?'
- ks += self._rwx((self.st_mode & 0700) >> 6, self.st_mode & stat.S_ISUID)
- ks += self._rwx((self.st_mode & 070) >> 3, self.st_mode & stat.S_ISGID)
+ ks += self._rwx((self.st_mode & o700) >> 6, self.st_mode & stat.S_ISUID)
+ ks += self._rwx((self.st_mode & o70) >> 3, self.st_mode & stat.S_ISGID)
ks += self._rwx(self.st_mode & 7, self.st_mode & stat.S_ISVTX, True)
else:
ks = '?---------'
# compute display date
- if (self.st_mtime is None) or (self.st_mtime == 0xffffffffL):
+ if (self.st_mtime is None) or (self.st_mtime == xffffffff):
# shouldn't really happen
datestr = '(unknown date)'
else: