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