selinux/python
Petr Lautrbach 60a9285786
python/semanage module: Fix handling of -a/-e/-d/-r options
Previous code traceback-ed when one of the mentioned option was used without
any argument as this state was not handled by the argument parser.

action='store' stores arguments as a list while the original
action='store_const' used str therefore it's needed to convert list to str
before it's sent to moduleRecords class.

Fixes:
^_^ semanage module -a
Traceback (most recent call last):
  File "/usr/sbin/semanage", line 963, in <module>
    do_parser()
  File "/usr/sbin/semanage", line 942, in do_parser
    args.func(args)
  File "/usr/sbin/semanage", line 608, in handleModule
    OBJECT.add(args.module_name, args.priority)
  File "/usr/lib/python3.7/site-packages/seobject.py", line 402, in add
    if not os.path.exists(file):
  File "/usr/lib64/python3.7/genericpath.py", line 19, in exists
    os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
2019-02-17 22:35:15 +01:00
..
audit2allow python: always use python3 in the shebang of programs using setools 2019-02-17 22:34:50 +01:00
chcat python: always use python3 in the shebang of programs using setools 2019-02-17 22:34:50 +01:00
semanage python/semanage module: Fix handling of -a/-e/-d/-r options 2019-02-17 22:35:15 +01:00
sepolgen python: use == or != when comparing a variable with a string or a integer 2019-01-31 20:57:23 +01:00
sepolicy python: always use python3 in the shebang of programs using setools 2019-02-17 22:34:50 +01:00
COPYING Add COPYING files for new subdirs. 2016-11-16 11:19:51 -05:00
Makefile python: run all the tests with "make test" 2019-01-08 10:15:46 +01:00
VERSION Update VERSIONs to 2.9-rc1 for release. 2019-01-25 11:48:54 +01:00