mirror of
https://github.com/nvbn/thefuck.git
synced 2025-10-29 22:24:44 +00:00
#161 support different psutils versions
This commit is contained in:
@@ -98,7 +98,10 @@ shells = defaultdict(lambda: Generic(), {
|
||||
|
||||
|
||||
def _get_shell():
|
||||
shell = Process(os.getpid()).parent().cmdline()[0]
|
||||
try:
|
||||
shell = Process(os.getpid()).parent().cmdline()[0]
|
||||
except TypeError:
|
||||
shell = Process(os.getpid()).parent.cmdline[0]
|
||||
return shells[shell]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user