Trivial changes to make the code pythonic Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>