mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-10-31 05:53:25 +00:00 
			
		
		
		
	utils/serial_port: fix exception message
SerialError does not populate it's message attribute, so the message was lost when re-raising as HostError. Pass the string representation of SerialError into HostError instead.
This commit is contained in:
		
				
					committed by
					
						 Marc Bonnici
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							f490a55be2
						
					
				
				
					commit
					c706e693ba
				
			| @@ -55,7 +55,7 @@ def get_connection(timeout, init_dtr=None, logcls=SerialLogger, | ||||
|     try: | ||||
|         conn = serial.Serial(*args, **kwargs) | ||||
|     except serial.SerialException as e: | ||||
|         raise HostError(e.message) | ||||
|         raise HostError(str(e)) | ||||
|     if init_dtr is not None: | ||||
|         conn.setDTR(init_dtr) | ||||
|     conn.nonblocking() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user