diff --git a/osc/commandline.py b/osc/commandline.py index ba94008f..6e59ba62 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -2803,7 +2803,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. osc remotebuildlog project/package/repository/arch ${cmd_option_list} """ - if len(args) == 1: + if len(args) == 1 and args[0].startswith('http'): apiurl, project, package, repository, arch = parse_buildlogurl(args[0]) else: args = slash_split(args) diff --git a/osc/core.py b/osc/core.py index 40f5fe5b..94a78f0a 100644 --- a/osc/core.py +++ b/osc/core.py @@ -33,7 +33,7 @@ except ImportError: DISTURL_RE = re.compile(r"^(?P.*)://(?P.*?)/(?P.*?)/(?P.*?)/(?P.*)-(?P.*)$") -BUILDLOGURL_RE = re.compile(r"^(?Phttps://.*?)/build/(?P.*?)/(?P.*?)/(?P.*?)/(?P.*?)/_log$") +BUILDLOGURL_RE = re.compile(r"^(?Phttps?://.*?)/build/(?P.*?)/(?P.*?)/(?P.*?)/(?P.*?)/_log$") BUFSIZE = 1024*1024 store = '.osc' @@ -1714,7 +1714,7 @@ def parse_buildlogurl(buildlogurl): m = BUILDLOGURL_RE.match(buildlogurl) if not m: - raise oscerr.WrongArgs("`%s' does not look like url with a build log" % buildlogurl) + raise oscerr.WrongArgs('\'%s\' does not look like url with a build log' % buildlogurl) return (m.group('apiurl'), m.group('project'), m.group('package'), m.group('repository'), m.group('arch'))