MCPcopy Index your code
hub / github.com/RustPython/RustPython / __init__

Method __init__

Lib/mailbox.py:995–1005  ·  view source on GitHub ↗

Initialize an MH instance.

(self, path, factory=None, create=True)

Source from the content-addressed store, hash-verified

993 """An MH mailbox."""
994
995 def __init__(self, path, factory=None, create=True):
996 """Initialize an MH instance."""
997 Mailbox.__init__(self, path, factory, create)
998 if not os.path.exists(self._path):
999 if create:
1000 os.mkdir(self._path, 0o700)
1001 os.close(os.open(os.path.join(self._path, '.mh_sequences'),
1002 os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o600))
1003 else:
1004 raise NoSuchMailboxError(self._path)
1005 self._locked = False
1006
1007 def add(self, message):
1008 """Add message and return assigned key."""

Callers 11

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 6

NoSuchMailboxErrorClass · 0.85
existsMethod · 0.45
mkdirMethod · 0.45
closeMethod · 0.45
openMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected