Message10076

Author jdemoor
Recipients dstromberg, jdemoor
Date 2015-05-24.10:52:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432464763.41.0.238828644994.issue2358@psf.upfronthosting.co.za>
In-reply-to
Content
This bug existed in Jython 2.5 as well. FWIW, here's a workaround.

# Jython's open() cannot read the /proc filesystem
def _readfile(self, fn):
    f = os.open(fn, os.O_RDONLY)
    try:
        stream = f.asInputStream()
        out = []
        try:
            while 1:
                out.append(chr(stream.read()))
        except Exception:
            pass
        return ''.join(out)
    finally:
        f.close()
History
Date User Action Args
2015-05-24 10:52:43jdemoorsetmessageid: <1432464763.41.0.238828644994.issue2358@psf.upfronthosting.co.za>
2015-05-24 10:52:43jdemoorsetrecipients: + jdemoor, dstromberg
2015-05-24 10:52:43jdemoorlinkissue2358 messages
2015-05-24 10:52:42jdemoorcreate