mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-20 20:09:07 +00:00
#161 support different psutils versions
This commit is contained in:
parent
5b6e17b5f1
commit
64318c09b7
@ -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]
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user