Доработана функция getPasswdUsers

legacy27 3.6.0_beta7
Mike Hiretsky 6 years ago
parent 98b2c17588
commit c03eeb56d6

@ -170,12 +170,13 @@ def getAvailableVideo(prefix="/"):
getDistfilesVideo(prefix=prefix)))
def getPasswdUsers(minId=1000, maxId=65000, prefix="/"):
def getPasswdUsers(minId=1000, maxId=65000, prefix="/",
datafile="etc/passwd"):
"""
Get users from passwd from minId to maxId
"""
retList = []
fileName = path.join(prefix, "etc/passwd")
fileName = path.join(prefix, datafile)
if os.access(fileName, os.R_OK):
reNumb = re.compile("^\d+$")
lenData = 7

Loading…
Cancel
Save