Code review comment for lp://staging/~larry-e-works/uci-engine/write-exitcode-to-file

Revision history for this message
Francis Ginther (fginther) wrote :

As Paul mentioned, instead of using the explicit open/close as in:

    exitcode = open(ec_path, 'w')
    exitcode.write(ec)
    exitcode.close()

You can use the context manager style to write:

    with open(ec_path, 'w') as exitcode:
        exitcode.write(ec)

I don't know if there is a preferred name for the exit_code file. The one chosen looks good to me.

« Back to merge proposal