Properly answer an error instead of tracebacking on unknown command execution.
This commit is contained in:
		
				
					committed by
					
						
						Florent Le Coz
					
				
			
			
				
	
			
			
			
						parent
						
							2ce931cb7a
						
					
				
				
					commit
					170bd51387
				
			@@ -216,6 +216,7 @@ class XEP_0050(BasePlugin):
 | 
				
			|||||||
        name, handler = self.commands.get(key, ('Not found', None))
 | 
					        name, handler = self.commands.get(key, ('Not found', None))
 | 
				
			||||||
        if not handler:
 | 
					        if not handler:
 | 
				
			||||||
            log.debug('Command not found: %s, %s', key, self.commands)
 | 
					            log.debug('Command not found: %s, %s', key, self.commands)
 | 
				
			||||||
 | 
					            raise XMPPError('item-not-found')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        payload = []
 | 
					        payload = []
 | 
				
			||||||
        for stanza in iq['command']['substanzas']:
 | 
					        for stanza in iq['command']['substanzas']:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user