mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-30 22:54:14 +00:00 
			
		
		
		
	#N/A: Monkeypatch old pathlib even on unix
This commit is contained in:
		| @@ -1,3 +1,4 @@ | |||||||
|  | import os | ||||||
| import sys | import sys | ||||||
| import tty | import tty | ||||||
| import termios | import termios | ||||||
| @@ -38,3 +39,10 @@ try: | |||||||
|     from pathlib import Path |     from pathlib import Path | ||||||
| except ImportError: | except ImportError: | ||||||
|     from pathlib2 import Path |     from pathlib2 import Path | ||||||
|  |  | ||||||
|  |  | ||||||
|  | def _expanduser(self): | ||||||
|  |     return self.__class__(os.path.expanduser(str(self))) | ||||||
|  |  | ||||||
|  | if not hasattr(Path, 'expanduser'): | ||||||
|  |     Path.expanduser = _expanduser | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user