database: bring up to PEP 8 standards.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
filemanip: clean up PEP 8 errors.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Create a new exception for corrupt files.

The error text for corrupt files was duplicated several times around the
filemanip code with only minor variations.  Create a new exception,
CorruptFileError, that formats this message correctly given the type of
file and the specific type of corruption.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Ensure checksums are checked in.

Because sets are unordered, it was possible for the transactions to be
ordered such that the hash transactions occurred after the git
transactions.  That resulted in the dtb.checksum file not being checked
in properly.  It also resulted in a sporadically-failing test.

Ensure that the hash transactions are ordered before the git
transactions.  Run the tests 100 times to ensure that the failure is
fixed.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Prevent warning about unclosed popen.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
testcallbacks: add spacing for PEP 8.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
main: bring up to PEP 8 standards.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>