Message7768

Author amak
Recipients amak, fwierzbicki, irmen, otmarhumbel, whistler11783
Date 2013-02-25.22:12:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361830341.39.0.143144989459.issue1808@psf.upfronthosting.co.za>
In-reply-to
Content
OK, if it's just for 2.5, I'm tempted to apply this fix, since getpid() is a common requirement for all kinds of things.

###########

import os

if not hasattr(os, 'getpid'):
    from java.lang.management import ManagementFactory
    _getpid = lambda: int(ManagementFactory.getRuntimeMXBean().name.split("@")[0])
    setattr(os, "getpid", _getpid)

###########
History
Date User Action Args
2013-02-25 22:12:21amaksetmessageid: <1361830341.39.0.143144989459.issue1808@psf.upfronthosting.co.za>
2013-02-25 22:12:21amaksetrecipients: + amak, otmarhumbel, fwierzbicki, irmen, whistler11783
2013-02-25 22:12:21amaklinkissue1808 messages
2013-02-25 22:12:21amakcreate