Generally looks pretty good. See some specific comments below and feel free to mine http://git.beaker-project.org/cgit/beaker/tree/Common/bkr/common/helpers.py?h=develop&id=3a02ce6559c9bad3c5252b69995bad4686df7b62#n90 for ideas.