1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

Merge pull request #446 from lethliel/add_error_for_issue_445

print error and exit if p.apiurl != -A <apiurl> using osc sr
This commit is contained in:
Marco Strigl 2019-09-17 14:11:20 +02:00 committed by GitHub
commit 1e4e7edad5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1331,6 +1331,10 @@ class Osc(cmdln.Cmdln):
p = findpacs(os.curdir)[0]
src_project = p.prjname
src_package = p.name
if self.options.apiurl and self.options.apiurl != p.apiurl:
print('The apiurl for the working copy of this package is %s' % p.apiurl)
print('You cannot use this command with the -A %s option.' % self.options.apiurl)
sys.exit(1)
apiurl = p.apiurl
if len(args) == 0 and p.islink():
dst_project = p.linkinfo.project