Skip to content

Commit

Permalink
pass apiurl to source services (#234)
Browse files Browse the repository at this point in the history
Some source services need to know the apiurl, e.g. to lookup values
in the ~/.oscrc config file.

Closes #234.

#234
  • Loading branch information
aspiers committed Oct 1, 2016
1 parent b4d4d3c commit 8c45eb6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions osc/core.py
Expand Up @@ -297,6 +297,7 @@ def error(msg, xml):
self.services.append(data)

def getProjectGlobalServices(self, apiurl, project, package):
self.apiurl = apiurl
# get all project wide services in one file, we don't store it yet
u = makeurl(apiurl, ['source', project, package], query='cmd=getprojectservices')
try:
Expand Down Expand Up @@ -392,6 +393,7 @@ def execute(self, dir, callmode = None, singleservice = None, verbose = None):

# set environment when using OBS 2.3 or later
if self.project != None:
os.putenv("OBS_SERVICE_APIURL", self.apiurl)
os.putenv("OBS_SERVICE_PROJECT", self.project)
os.putenv("OBS_SERVICE_PACKAGE", self.package)

Expand Down

0 comments on commit 8c45eb6

Please sign in to comment.