1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-06 02:41:10 +01:00

#161 support different psutils versions

This commit is contained in:
nvbn 2015-05-11 14:16:23 +02:00
parent 5b6e17b5f1
commit 64318c09b7

View File

@ -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]