UPGRADE: do not throw error if no sites are configured

Review Request #5547 — Created Feb. 26, 2014 and submitted

Information

Review Board
release-1.7.x

Reviewers

UPGRADE: do not throw error if no sites are configured

Previously, if 'rb-site upgrade --all-sites' was called and the
site file either did not exist or contained no valid entries (such
as all sites having been removed but the sitelist being missed),
it would return with error code 1.

This breaks scripts such as that on an upcoming Fedora release of
Review Board that will be running the --all-sites upgrade as part
of the Apache start-up. In order for it to be possible for Review
Board to be installed on the system, unconfigured and not break
Apache, we need to treat this exit code as success.

Verified that running 'rb-site upgrade --all-sites' with no /etc/reviewboard/sites file printed the message "No Review Board sites listed in /etc/reviewboard/sites" and exited with code 0 (success).

david
  1. Ship It!

  2. 
      
sgallagh
Review request changed
Status:
Completed
Change Summary:
Pushed to release-1.7.x (bc6b55b). Thanks!