mirror of
https://github.com/SELinuxProject/setools
synced 2025-02-12 01:46:58 +00:00
seinfoflow: remove redundant try block
This commit is contained in:
parent
f24a8237ab
commit
a659c87b50
12
seinfoflow
12
seinfoflow
@ -82,14 +82,10 @@ try:
|
||||
g = setools.infoflow.InfoFlowAnalysis(p, m, minweight=args.min_weight, exclude=args.exclude)
|
||||
|
||||
if args.shortest_path or args.all_paths:
|
||||
try:
|
||||
if args.shortest_path:
|
||||
paths = g.all_shortest_paths(args.source, args.target)
|
||||
else:
|
||||
paths = g.all_paths(args.source, args.target, args.all_paths)
|
||||
except Exception as err:
|
||||
print(err)
|
||||
sys.exit(1)
|
||||
if args.shortest_path:
|
||||
paths = g.all_shortest_paths(args.source, args.target)
|
||||
else:
|
||||
paths = g.all_paths(args.source, args.target, args.all_paths)
|
||||
|
||||
flownum = 0
|
||||
for flownum, path in enumerate(paths, start=1):
|
||||
|
Loading…
Reference in New Issue
Block a user