fix incorrect syntax, fixes #126

This commit is contained in:
Upi Tamminen 2014-06-14 13:11:03 +03:00
parent 5f06a22fca
commit 957508f3b7
1 changed files with 4 additions and 4 deletions

View File

@ -28,9 +28,9 @@ def recurse(root, tree, count = 0):
entry = [name, T_FILE, s.st_uid, s.st_gid, s.st_size, s.st_mode, \
int(s.st_ctime), [], None, None]
if S_ISLNK(s[ST_MODE]):
entry[A_TYPE] = T_LINK
entry[A_TARGET] = os.path.realpath(path)
if S_ISLNK(s[ST_MODE]):
entry[A_TYPE] = T_LINK
entry[A_TARGET] = os.path.realpath(path)
elif S_ISDIR(s[ST_MODE]):
entry[A_TYPE] = T_DIR
if not path.startswith('/proc/'):
@ -47,7 +47,7 @@ def recurse(root, tree, count = 0):
entry[A_TYPE] = T_FIFO
else:
sys.stderr.write('We should handle %s' % path)
sys.exit(1)
sys.exit(1)
tree.append(entry)