Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'python/src/tcf/services/filesystem.py')
-rw-r--r--python/src/tcf/services/filesystem.py58
1 files changed, 29 insertions, 29 deletions
diff --git a/python/src/tcf/services/filesystem.py b/python/src/tcf/services/filesystem.py
index 51f3bb4b5..f3cc7f301 100644
--- a/python/src/tcf/services/filesystem.py
+++ b/python/src/tcf/services/filesystem.py
@@ -1,5 +1,5 @@
# *****************************************************************************
-# * Copyright (c) 2011, 2013-2014 Wind River Systems, Inc. and others.
+# * Copyright (c) 2011, 2013-2014, 2016 Wind River Systems, Inc. and others.
# * All rights reserved. This program and the accompanying materials
# * are made available under the terms of the Eclipse Public License v1.0
# * which accompanies this distribution, and is available at
@@ -629,10 +629,10 @@ class FileAttrs(object):
def __eq__(self, other):
if not isinstance(other, FileAttrs):
return False
- return (self.flags == other.flags and self.size == other.size and \
- self.uid == other.uid and self.gid == other.gid and \
- self.permissions == other.permissions and \
- self.mtime == other.mtime and \
+ return (self.flags == other.flags and self.size == other.size and
+ self.uid == other.uid and self.gid == other.gid and
+ self.permissions == other.permissions and
+ self.mtime == other.mtime and
self.attributes == other.attributes)
def __ne__(self, other):
@@ -640,29 +640,29 @@ class FileAttrs(object):
# The following flags are defined for the 'permissions' field:
-S_IFMT = 0170000
-S_IFSOCK = 0140000
-S_IFLNK = 0120000
-S_IFREG = 0100000
-S_IFBLK = 0060000
-S_IFDIR = 0040000
-S_IFCHR = 0020000
-S_IFIFO = 0010000
-S_ISUID = 0004000
-S_ISGID = 0002000
-S_ISVTX = 0001000
-S_IRWXU = 00700
-S_IRUSR = 00400
-S_IWUSR = 00200
-S_IXUSR = 00100
-S_IRWXG = 00070
-S_IRGRP = 00040
-S_IWGRP = 00020
-S_IXGRP = 00010
-S_IRWXO = 00007
-S_IROTH = 00004
-S_IWOTH = 00002
-S_IXOTH = 00001
+S_IFMT = 0o170000
+S_IFSOCK = 0o140000
+S_IFLNK = 0o120000
+S_IFREG = 0o100000
+S_IFBLK = 0o060000
+S_IFDIR = 0o040000
+S_IFCHR = 0o020000
+S_IFIFO = 0o010000
+S_ISUID = 0o004000
+S_ISGID = 0o002000
+S_ISVTX = 0o001000
+S_IRWXU = 0o0700
+S_IRUSR = 0o0400
+S_IWUSR = 0o0200
+S_IXUSR = 0o0100
+S_IRWXG = 0o0070
+S_IRGRP = 0o0040
+S_IWGRP = 0o0020
+S_IXGRP = 0o0010
+S_IRWXO = 0o0007
+S_IROTH = 0o0004
+S_IWOTH = 0o0002
+S_IXOTH = 0o0001
class DirEntry(object):
@@ -733,7 +733,7 @@ class FileSystemException(IOError):
initialise this exception with
"""
def __init__(self, message_or_exception):
- if isinstance(message_or_exception, (str, unicode)):
+ if isinstance(message_or_exception, str):
super(FileSystemException, self).__init__(message_or_exception)
elif isinstance(message_or_exception, Exception):
self.caused_by = message_or_exception

Back to the top