From 7297051882d08ae860886c7aaf0ce8b1c8a1ddd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Thu, 2 Feb 2023 09:42:59 +0100
Subject: [PATCH] FIX: correct variable name

---
 src/caoscrawler/crawl.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py
index 49fd779b..b2c9ae32 100644
--- a/src/caoscrawler/crawl.py
+++ b/src/caoscrawler/crawl.py
@@ -1385,6 +1385,10 @@ def parse_args():
                                      formatter_class=RawTextHelpFormatter)
     parser.add_argument("cfood_file_name",
                         help="Path name of the cfood yaml file to be used.")
+    parser.add_argument("-r", "--restrict", nargs="*",
+                        help="Restrict the crawling to the subtree at the end of the given path."
+                        "I.e. for each level that is given the crawler only treats the element "
+                        "with the given name.")
     parser.add_argument("--provenance", required=False,
                         help="Path name of the provenance yaml file. "
                         "This file will only be generated if this option is set.")
@@ -1412,10 +1416,6 @@ def parse_args():
     parser.add_argument("-p", "--prefix",
                         help="Remove the given prefix from the paths "
                         "of all file objects.")
-    parser.add_argument("-r", "--restrict",
-                        help="Restrict the crawling to the subtree at the end of the given path."
-                        "I.e. for each level that is given the crawler only treats the element "
-                        "with the given name.")
 
     return parser.parse_args()
 
@@ -1447,7 +1447,7 @@ def main():
                       "insert": SecurityMode.INSERT,
                       "update": SecurityMode.UPDATE}[args.security_mode],
         unique_names=args.unique_names,
-        restricted_path=restricted_path
+        restricted_path=args.restrict
     ))
 
 
-- 
GitLab