mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00:00 
			
		
		
		
	utils/version: Fix check to only decode bytes
When using Python3 the returned value of the commit is a byte string and therefore needs to be decoded.
This commit is contained in:
		@@ -24,7 +24,7 @@ def get_commit():
 | 
				
			|||||||
    p.wait()
 | 
					    p.wait()
 | 
				
			||||||
    if p.returncode:
 | 
					    if p.returncode:
 | 
				
			||||||
        return None
 | 
					        return None
 | 
				
			||||||
    if sys.version_info[0] == 3 and isinstance(std, str):
 | 
					    if sys.version_info[0] == 3 and isinstance(std, bytes):
 | 
				
			||||||
        return std[:8].decode(sys.stdout.encoding, 'replace')
 | 
					        return std[:8].decode(sys.stdout.encoding, 'replace')
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        return std[:8]
 | 
					        return std[:8]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user