With this and https://github.com/candlepin/subscription-manager/pull/826/ this code is duplicated
between rhsm/connection.py and subman/utils.py

Living just in python-rhsm probably makes sense. But that means subman branch needs updates to
use the new rhsm versions and exceptions.

slightly tempted to suggest rhsm/utils.py, since connections.py is already a mess. But then, it is already a mess.