bots: zulip_bot_output.py: Check for absence of handler_class in bot.
This commit is contained in:
		
							parent
							
								
									8e9c6cd22e
								
							
						
					
					
						commit
						8987ec23e2
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -68,7 +68,11 @@ def main(): | |||
|         sys.exit(1) | ||||
| 
 | ||||
|     message = {'content': args.message, 'sender_email': 'foo_sender@zulip.com'} | ||||
|     message_handler = lib_module.handler_class() | ||||
|     try: | ||||
|         message_handler = lib_module.handler_class() | ||||
|     except AttributeError: | ||||
|         print("This module does not appear to have a bot handler_class specified.") | ||||
|         sys.exit(1) | ||||
| 
 | ||||
|     with patch('zulip.Client') as mock_client: | ||||
|         mock_bot_handler = ExternalBotHandler(mock_client, bot_dir) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 neiljp (Neil Pilgrim)
						neiljp (Neil Pilgrim)