Fix help bug for export-rattail command

can't assume we have a config object
This commit is contained in:
Lance Edgar 2019-02-08 15:43:36 -06:00
parent 559d14eb21
commit 4323fde854

View file

@ -263,8 +263,12 @@ class ExportRattail(ImportSubcommand):
default_dbkey = 'host'
def get_handler_factory(self, **kwargs):
if self.config:
spec = self.config.get('rattail.exporting', 'rattail.handler',
default=self.default_handler_spec)
else:
# just use default, for sake of cmd line help
spec = self.default_handler_spec
return load_object(spec)
def add_parser_args(self, parser):