HomePhabricator
Diffusion Scap b7c0b953aa25

Fix several minor (but annoying) bugs with path checking

Authored by mmodell.

Description

Fix several minor (but annoying) bugs with path checking

Projects: Release-Engineering-Team

Summary:
This revision fixes a couple of minor path validation and creation bugs which only
show up when you don't have the deployment repo completely configured.

  • use dirname instead of basename with mkdir_p ;)
  • check for filename==None in check_file_exists (improves error message when called incorrectly)
  • automatically create the scap/log directory if it doesn't exist

Test Plan:
after applying this patch, new deployment repo setup should be less frustrating, as in the following scenario:

  • run deploy on a fresh scap setup (e.g. freshly created deploy repo without all the expected pieces)
  • begin to work your way through adding all the expected pieces
  • along the way to deployment bliss, notice that you experience fewer annoying errors with little more than a stack trace.
  • ????
  • profit?

Reviewers: demon, Release-Engineering-Team, thcipriani

Reviewed By: Release-Engineering-Team, thcipriani

Subscribers: dduvall, jenkins

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

Details

Committed
demonJan 29 2016, 5:23 PM
Reviewer
Release-Engineering-Team
Differential Revision
D101: Fix several minor (but annoying) bugs with path checking
Parents
rMSCAe6298d7560dd: Retry system calls that were interrupted by EINTR
Branches
Unknown
Tags
Unknown
ChangeId
None