Use dict.get instead of catching exceptions.

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