From: Michael Tremer Date: Sat, 2 Mar 2024 11:00:26 +0000 (+0000) Subject: importer: Add the option to only update one feed X-Git-Tag: 0.9.18~128 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7f8e7143c4b13719297b3d41f6caf3d618407e8;p=location%2Flibloc.git importer: Add the option to only update one feed Signed-off-by: Michael Tremer --- diff --git a/src/scripts/location-importer.in b/src/scripts/location-importer.in index 3fa8357..45b18dd 100644 --- a/src/scripts/location-importer.in +++ b/src/scripts/location-importer.in @@ -107,6 +107,8 @@ class CLI(object): # Update feeds update_feeds = subparsers.add_parser("update-feeds", help=_("Update Feeds")) + update_feeds.add_argument("feeds", nargs="*", + help=_("Only update these feeds")) update_feeds.set_defaults(func=self.handle_update_feeds) # Update overrides @@ -1812,6 +1814,10 @@ class CLI(object): # Walk through all feeds for name, callback, url, *args in feeds: + # Skip any feeds that were not requested on the command line + if ns.feeds and not name in ns.feeds: + continue + try: self._process_feed(downloader, name, callback, url, *args)