summaryrefslogtreecommitdiff
path: root/paramiko/sftp_attr.py
diff options
context:
space:
mode:
authorDorian Pula <dorian.pula@amber-penguin-software.ca>2017-05-30 12:02:17 -0400
committerJeff Forcier <jeff@bitprophet.org>2017-05-31 17:14:40 -0700
commitecb297518267487853813109da946d7240d717e1 (patch)
tree9974aecc603adad39e6bb88034c08dd74d91340e /paramiko/sftp_attr.py
parent98f682815cdd33a2f1999b931582e2467bb59754 (diff)
downloadparamiko-ecb297518267487853813109da946d7240d717e1.tar.gz
Additional PEP8 fixes.
Diffstat (limited to 'paramiko/sftp_attr.py')
-rw-r--r--paramiko/sftp_attr.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py
index 0eaca30b..5597948a 100644
--- a/paramiko/sftp_attr.py
+++ b/paramiko/sftp_attr.py
@@ -84,7 +84,7 @@ class SFTPAttributes (object):
def __repr__(self):
return '<SFTPAttributes: %s>' % self._debug_str()
- ### internals...
+ # ...internals...
@classmethod
def _from_msg(cls, msg, filename=None, longname=None):
attr = cls()
@@ -189,9 +189,12 @@ class SFTPAttributes (object):
ks = 's'
else:
ks = '?'
- 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)
+ 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
@@ -201,9 +204,11 @@ class SFTPAttributes (object):
else:
if abs(time.time() - self.st_mtime) > 15552000:
# (15552000 = 6 months)
- datestr = time.strftime('%d %b %Y', time.localtime(self.st_mtime))
+ datestr = time.strftime(
+ '%d %b %Y', time.localtime(self.st_mtime))
else:
- datestr = time.strftime('%d %b %H:%M', time.localtime(self.st_mtime))
+ datestr = time.strftime(
+ '%d %b %H:%M', time.localtime(self.st_mtime))
filename = getattr(self, 'filename', '?')
# not all servers support uid/gid
@@ -217,7 +222,8 @@ class SFTPAttributes (object):
if size is None:
size = 0
- return '%s 1 %-8d %-8d %8d %-12s %s' % (ks, uid, gid, size, datestr, filename)
+ return '%s 1 %-8d %-8d %8d %-12s %s' % (
+ ks, uid, gid, size, datestr, filename)
def asbytes(self):
return b(str(self))