Commit 10fa313b authored by Michael Tremer's avatar Michael Tremer

location(8): Export all countries by default

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent fa9a3663
......@@ -169,7 +169,7 @@ class CLI(object):
export.add_argument("--family",
help=_("Specify address family"), choices=("ipv6", "ipv4"),
)
export.add_argument("objects", nargs="+", help=_("List country codes or ASNs to export"))
export.add_argument("objects", nargs="*", help=_("List country codes or ASNs to export"))
export.set_defaults(func=self.handle_export)
args = parser.parse_args()
......@@ -539,9 +539,9 @@ class CLI(object):
log.warning("Invalid argument: %s" % object)
continue
# Default to exporting all countries
if not countries and not asns:
log.error("Nothing to export")
return 2
countries = ["A1", "A2", "A3"] + [country.code for country in db.countries]
# Select the output format
writer = self.__get_output_formatter(ns)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment