Page MenuHomePhabricator

rust: better treatment of cargo/rustc errors
ClosedPublic

Authored by gracinet on Dec 15 2018, 6:41 AM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

gracinet created this revision.Dec 15 2018, 6:41 AM
yuja added a subscriber: yuja.Dec 15 2018, 10:22 PM

+ cargocmd = ['cargo', 'build', '-vv', '--release']
+ try:
+ subprocess.check_call(cargocmd, env=env, cwd=self.rustsrcdir)
+ except OSError as exc:
+ if exc.errno == os.errno.ENOENT:

Added import errno to not abuse os.errno. I don't think it's a re-exported
module.

This revision was automatically updated to reflect the committed changes.