check theres not already a tag for this version

def check_tag(version):
    """ check theres not already a tag for this version """

    output = run('git', 'tag', stdout=subprocess.PIPE).communicate()[0]
    tags = set(output.decode('utf-8').splitlines())

    if 'v{}'.format(version) in tags:
        error('version already exists')