def update_debianization(version):
    """
    Update Debian's changelog to current version and append "dummy" message.
    """
    # we need to add string version in the whole method
    if isinstance(version, (tuple, list)):
        version = '.'.join(map(str, version))
    changelog = 'debian/changelog'
    hash = get_git_head_hash()
    message = "Version %(version)s was build from revision %(hash)s by automated build system" % {
                      'version' : version,
                      'hash' : hash
    }

    proc = Popen(['dch', '--changelog', changelog, '--newversion', version, '"%s"' % message], stdout=PIPE)

    return_code = proc.wait()
    if return_code == 0:
        return proc.stdout.read().strip()
    else:
        raise ValueError(return_code % "Updating debianization failed with exit code %s")
dataset/ETHPy150Open ella/citools/citools/debian/commands.py/update_debianization/swapped operands of `%`