mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-13 17:16:23 +01:00
check if project wide _service file really exists
This commit is contained in:
parent
79656a45e1
commit
602abd7c1e
13
osc/core.py
13
osc/core.py
@ -277,9 +277,16 @@ class Serviceinfo:
|
|||||||
def readProjectFile(self, apiurl, project):
|
def readProjectFile(self, apiurl, project):
|
||||||
# download project wide _service file, we don't store it yet
|
# download project wide _service file, we don't store it yet
|
||||||
u = makeurl(apiurl, ['source', project, "_project", "_service"])
|
u = makeurl(apiurl, ['source', project, "_project", "_service"])
|
||||||
f = http_GET(u)
|
root = None
|
||||||
root = ET.parse(f).getroot()
|
try:
|
||||||
self.read(root, True)
|
f = http_GET(u)
|
||||||
|
root = ET.parse(f).getroot()
|
||||||
|
except urllib2.HTTPError, e:
|
||||||
|
if e.code != 404:
|
||||||
|
raise e
|
||||||
|
if root:
|
||||||
|
self.read(root, True)
|
||||||
|
|
||||||
|
|
||||||
def addVerifyFile(self, serviceinfo_node, filename):
|
def addVerifyFile(self, serviceinfo_node, filename):
|
||||||
import hashlib
|
import hashlib
|
||||||
|
Loading…
Reference in New Issue
Block a user