mirror of
				https://github.com/arsenetar/send2trash.git
				synced 2025-09-11 18:08:16 +00:00 
			
		
		
		
	Fixes str() TypeError
Fixes TypeError: str() takes at most 1 argument (2 given), change proposed by @jmathai related to https://github.com/jmathai/elodie/issues/223
This commit is contained in:
		
							parent
							
								
									0974912e78
								
							
						
					
					
						commit
						bc53144139
					
				| @ -133,7 +133,7 @@ def get_dev(path): | |||||||
| 
 | 
 | ||||||
| def send2trash(path): | def send2trash(path): | ||||||
|     if not isinstance(path, str): |     if not isinstance(path, str): | ||||||
|         path = str(path, sys.getfilesystemencoding()) |         path = str(path).encode(sys.getfilesystemencoding()) | ||||||
|     if not op.exists(path): |     if not op.exists(path): | ||||||
|         raise OSError("File not found: %s" % path) |         raise OSError("File not found: %s" % path) | ||||||
|     # ...should check whether the user has the necessary permissions to delete |     # ...should check whether the user has the necessary permissions to delete | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user