Fix help bug for export-rattail command
				
					
				
			can't assume we have a config object
This commit is contained in:
		
							parent
							
								
									559d14eb21
								
							
						
					
					
						commit
						4323fde854
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue