related to the above: why two different log.errors for the same if-elif construct? can it be merged into one unit?
(otherwise the second self.log.error is redundant codepath)