Update truthystring to return bool, not given int.
This commit is contained in:
		
							parent
							
								
									5f7266c519
								
							
						
					
					
						commit
						d653673277
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -358,8 +358,12 @@ def truthystring(s): | ||||||
| 
 | 
 | ||||||
|     Case insensitive. |     Case insensitive. | ||||||
|     ''' |     ''' | ||||||
|     if isinstance(s, (bool, int)) or s is None: |     if s is None: | ||||||
|         return s |         return None | ||||||
|  | 
 | ||||||
|  |     if isinstance(s, (bool, int)): | ||||||
|  |         return bool(s) | ||||||
|  | 
 | ||||||
|     s = s.lower() |     s = s.lower() | ||||||
|     if s in constants.TRUTHYSTRING_TRUE: |     if s in constants.TRUTHYSTRING_TRUE: | ||||||
|         return True |         return True | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue