seinfo: Use subset in PortconQuery config.

This will allow users to specify a single port number and see which
portcons apply.  This is more in line with user expectations than the
current exact match behavior.  Closes #171.
This commit is contained in:
Chris PeBenito 2017-09-25 20:17:59 -04:00
parent cc313f9791
commit 0a8b3d4bb1

2
seinfo
View File

@ -207,7 +207,7 @@ try:
components.append(("Polcap", q, lambda x: x.statement()))
if args.portconquery or args.all:
q = setools.PortconQuery(p)
q = setools.PortconQuery(p, ports_subset=True)
if isinstance(args.portconquery, str):
try:
ports = [int(i) for i in args.portconquery.split("-")]