summaryrefslogtreecommitdiffstats
path: root/Lib/mhlib.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-06-01 19:51:15 (GMT)
committerRaymond Hettinger <python@rcn.com>2002-06-01 19:51:15 (GMT)
commit32200aeac697fcb3f2b4528127a2fbf0a22a8f17 (patch)
treeb99f2c04d576a3699ab9a2b6dfc1fc0e31e3c734 /Lib/mhlib.py
parent16e3c427f35589ac3b83e8c13a8ec6495ec6cfa1 (diff)
downloadcpython-32200aeac697fcb3f2b4528127a2fbf0a22a8f17.zip
cpython-32200aeac697fcb3f2b4528127a2fbf0a22a8f17.tar.gz
cpython-32200aeac697fcb3f2b4528127a2fbf0a22a8f17.tar.bz2
Replaced obsolete stat module constants with equivalent attributes
Diffstat (limited to 'Lib/mhlib.py')
-rw-r--r--Lib/mhlib.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/mhlib.py b/Lib/mhlib.py
index 912f001..feb554e 100644
--- a/Lib/mhlib.py
+++ b/Lib/mhlib.py
@@ -74,7 +74,6 @@ FOLDER_PROTECT = 0700
import os
import sys
-from stat import ST_NLINK
import re
import mimetools
import multifile
@@ -155,8 +154,7 @@ class MH:
fullname = os.path.join(self.path, name)
# Get the link count so we can avoid listing folders
# that have no subfolders.
- st = os.stat(fullname)
- nlinks = st[ST_NLINK]
+ nlinks = os.stat(fullname).st_nlink
if nlinks <= 2:
return []
subfolders = []
@@ -183,8 +181,7 @@ class MH:
fullname = os.path.join(self.path, name)
# Get the link count so we can avoid listing folders
# that have no subfolders.
- st = os.stat(fullname)
- nlinks = st[ST_NLINK]
+ nlinks = os.stat(fullname).st_nlink
if nlinks <= 2:
return []
subfolders = []