2010/5/12 Luca Bigliardi <[email protected]>: > On Wed, May 12, 2010 at 5:05 PM, Michael Hanselmann <[email protected]> wrote: > >> I suggest wrapping this with try/except, so that it continues even if >> Mlockall failed. What do you think? > > Well ctypes documentation doesn't tell about specific exceptions we > can encounter while executing this function. > > Probably something like OSError or SystemError might happen anyway. > > Do you think to wrap with a "try / except (OSError,SystemError)" at caller > level or inside the function? I'd say inside the function.
At caller level: try: utils.Mlockall() except Exception: pass Similar to handling failed forks. Michael
