candlepin/subscription-manager — pull request #441 by jmrodri (2012-12-07 18:23:11+00:00)
Title: 883735: load branding module slightly differently

In RHEV-H all of the .py files are removed, and looking for the .pyc files will
break running the code from source, so it's best to load them all and pick the
first one. It'll either be the .py or the .pyc.

TEST PLAN
-----------------
* build rpm
`tito build --test --rpm`
* deploy rpm to test machine:
`rpm -Uvh /path/to/rpm`
* REMOVE redhat_branding.py file:
`mv /usr/share/rhsm/subscription_manager/branding/redhat_branding.py /tmp/`
* register machine to candlepin:
`subscription-manager register --org admin ...`
* It should work.

To see the actual error reported do the above steps using **MASTER**. You will see this:

> subscription-manager register --org admin
> Username: admin
> Password:
> The system has been registered with id: ae215e9e-7fa6-4301-940d-e9f67e3bd4e3 'DefaultBranding' object has no attribute 'REGISTERED_TO_SUBSCRIPTION_MANAGEMENT_SUMMARY'`