Fix the code according to https://github.com/openSUSE-Team/obs_factory/pull/24