fix: print_verbose scope
This commit is contained in:
+4
-2
@@ -8,8 +8,7 @@ import yaml
|
||||
from sigma.output import SigmaYAMLDumper
|
||||
|
||||
def print_verbose(*arg, **kwarg):
|
||||
if args.verbose:
|
||||
print(*arg, **kwarg)
|
||||
print(*arg, **kwarg)
|
||||
|
||||
# Define order-preserving representer from dicts/maps
|
||||
def yaml_preserve_order(self, dict_data):
|
||||
@@ -24,6 +23,9 @@ def main():
|
||||
argparser.add_argument("inputs", nargs="+", help="Sigma rule files or repository directories")
|
||||
args = argparser.parse_args()
|
||||
|
||||
if args.verbose:
|
||||
print_verbose()
|
||||
|
||||
if args.recursive:
|
||||
paths = [ p for pathname in args.inputs for p in Path(pathname).glob("**/*") if p.is_file() ]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user