mirror of
https://github.com/nvbn/thefuck.git
synced 2025-10-30 06:34:09 +00:00
#161 support different psutils versions
This commit is contained in:
@@ -98,7 +98,10 @@ shells = defaultdict(lambda: Generic(), {
|
|||||||
|
|
||||||
|
|
||||||
def _get_shell():
|
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]
|
return shells[shell]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user