1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-07 12:59:08 +03:00

Add docstrings to samba3 and getopt modules.

(This used to be commit bdf1c039db)
This commit is contained in:
Jelmer Vernooij
2008-05-22 18:47:32 +02:00
parent 37d000d052
commit c159d1221b
2 changed files with 18 additions and 0 deletions

View File

@ -309,6 +309,7 @@ class ShareInfoDatabase(TdbDatabase):
class Shares:
"""Container for share objects."""
def __init__(self, lp, shareinfo):
self.lp = lp
self.shareinfo = shareinfo
@ -494,6 +495,7 @@ class TdbSam(TdbDatabase):
assert self.version in (0, 1, 2)
def usernames(self):
"""Iterate over the usernames in this Tdb database."""
for k in self.tdb.keys():
if k.startswith(TDBSAM_USER_PREFIX):
yield k[len(TDBSAM_USER_PREFIX):].rstrip("\0")
@ -635,6 +637,7 @@ class WinsDatabase:
return iter(self.entries)
def items(self):
"""Return the entries in this WINS database."""
return self.entries.items()
def close(self): # for consistency