Ensure datahuman is a string if it's not
This commit is contained in:
		@@ -121,6 +121,9 @@ def format_bytes_tohuman(databytes):
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def format_bytes_fromhuman(datahuman):
 | 
			
		||||
    if not isinstance(datahuman, str):
 | 
			
		||||
        datahuman = str(datahuman)
 | 
			
		||||
 | 
			
		||||
    if not re.search(r"[A-Za-z]+", datahuman):
 | 
			
		||||
        dataunit = "B"
 | 
			
		||||
        datasize = float(datahuman)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user