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:
@ -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
|
||||
|
Reference in New Issue
Block a user