mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-19 04:58:52 +02:00
avoid bare except
This commit is contained in:
@@ -78,7 +78,7 @@ class Buildinfo:
|
|||||||
localpkgs = localpkgs or []
|
localpkgs = localpkgs or []
|
||||||
try:
|
try:
|
||||||
tree = ET.parse(filename)
|
tree = ET.parse(filename)
|
||||||
except:
|
except ET.ParseError:
|
||||||
print('could not parse the buildinfo:', file=sys.stderr)
|
print('could not parse the buildinfo:', file=sys.stderr)
|
||||||
print(open(filename).read(), file=sys.stderr)
|
print(open(filename).read(), file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@@ -802,7 +802,7 @@ def main(apiurl, opts, argv):
|
|||||||
try:
|
try:
|
||||||
build_root = build_root % {'repo': repo, 'arch': arch,
|
build_root = build_root % {'repo': repo, 'arch': arch,
|
||||||
'project': prj, 'package': pacname, 'apihost': apihost}
|
'project': prj, 'package': pacname, 'apihost': apihost}
|
||||||
except:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# We configure sccache after pacname, so that in default cases we can have an sccache for each
|
# We configure sccache after pacname, so that in default cases we can have an sccache for each
|
||||||
|
Reference in New Issue
Block a user