Fixes bug #7949 --- src/secstate/main.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/secstate/main.py b/src/secstate/main.py index 01405dd..47eca49 100644 --- a/src/secstate/main.py +++ b/src/secstate/main.py @@ -562,7 +562,7 @@ class Secstate: if benchmark.config.has_option(benchmark_id, 'profile'): active_profile = benchmark.config.get(benchmark_id, 'profile') # Only create 'Custom' profile if modifying an original profile - if (active_profile != "Custom") and (not benchmark.config.has_section(active_profile)): + if (active_profile != "Custom") and (not benchmark.config.has_section(active_profile)): if not benchmark.config.has_section("Custom"): benchmark.config.add_section("Custom") benchmark.config.set('Custom', 'extends', active_profile) @@ -649,6 +649,10 @@ class Secstate: args = self.content.keys()
file_index = [] + if len(args) == 0: + self.log.error("No content has been imported") + return False + for arg in args: scanned_content = self.import_content(arg) if scanned_content == None: