mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-14 01:49:56 +08:00
libmodulemd does not require the branch value to be bytes
This commit is contained in:
@@ -636,7 +636,7 @@ def _fetch_mmd(url, branch=None, allow_local_url=False, whitelist_url=False,
|
||||
'does not match the branch "{1}"'.format(
|
||||
mmd.get_stream(), scm.branch))
|
||||
else:
|
||||
mmd.set_stream(str(scm.branch))
|
||||
mmd.set_stream(scm.branch)
|
||||
|
||||
# If the version is in the modulemd, throw an exception since the version
|
||||
# since the version is generated by MBS
|
||||
|
||||
@@ -30,7 +30,7 @@ import json
|
||||
import module_build_service.auth
|
||||
from flask import request, url_for
|
||||
from flask.views import MethodView
|
||||
from six import text_type, string_types
|
||||
from six import string_types
|
||||
|
||||
from module_build_service import app, conf, log, models, db, version, api_version as max_api_version
|
||||
from module_build_service.utils import (
|
||||
@@ -401,10 +401,6 @@ class SCMHandler(BaseHandler):
|
||||
url = self.data["scmurl"]
|
||||
branch = self.data["branch"]
|
||||
|
||||
# python-modulemd expects this to be bytes, not unicode.
|
||||
if isinstance(branch, text_type):
|
||||
branch = branch.encode('utf-8')
|
||||
|
||||
return submit_module_build_from_scm(self.username, url, branch,
|
||||
allow_local_url=False,
|
||||
optional_params=self.optional_params)
|
||||
|
||||
Reference in New Issue
Block a user