rcbops / rpc_differ

Find differences between Rackspace Private Cloud releases
Apache License 2.0
1 stars 7 forks source link

RE-1405 Validate submodule exists before trying to use it #17

Closed odyssey4me closed 6 years ago

odyssey4me commented 6 years ago

The try/except approach currently used is somewhat brutal.

This patch changes the approach as follows:

  1. The latest approach to setting the OSA SHA (pike onwards) is tested for first and used if found.
  2. The submodule approach is tested second, but validation of whether the submodule even exists is tried before getting the SHA.
  3. Finally the functions approach is tried.
  4. If none of those are found, then throw an exception.