HomePhabricator
Diffusion Scap adbeba3d447f

Tidy up some low-level exception handling

Authored by demon on Oct 3 2017, 1:00 AM.

Description

Tidy up some low-level exception handling

Summary:

  • Use OSError with EPERM as our error condition when being run as root. SystemExit is really designed for stuff that calls sys.exit() and other low-level stuff. OSError is a far better description of what's happening here.
  • Remove weird _handle_system_exit() abstraction. I'm not even sure why we need this since none of our code outside of here calls sys.exit() or raises this exception, but at least it's slighly less confusing now

Reviewers: mmodell, Release-Engineering-Team, thcipriani

Reviewed By: Release-Engineering-Team, thcipriani

Subscribers: bd808, thcipriani, jenkins

Tags: Release-Engineering-Team

Differential Revision: https://phabricator.wikimedia.org/D795

Details

Committed
demonOct 3 2017, 1:18 AM
Reviewer
Release-Engineering-Team
Differential Revision
D795: Tidy up some low-level exception handling
Parents
rMSCA7df5576f40af: Refactor most git commands to use a single wrapper
Branches
Unknown
Tags
Unknown
ChangeId
None
Build Status
Buildable 2308
Build 3751: ci-jessieJenkins