From 1c98b9cc38d34647f1d6357919a0f4e1d5ebd4cd Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Thu, 21 Nov 2019 03:29:16 +0100 Subject: Remove current directory from sys.path in python invocations (#8408) * Remove current directory from sys.path in python invocations --- plugins/django/django.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/django') diff --git a/plugins/django/django.plugin.zsh b/plugins/django/django.plugin.zsh index 86558ff2e..c2d00c171 100644 --- a/plugins/django/django.plugin.zsh +++ b/plugins/django/django.plugin.zsh @@ -374,7 +374,8 @@ _managepy-commands() { _applist() { local line local -a apps - _call_program help-command "python -c \"import os.path as op, re, django.conf, sys;\\ + _call_program help-command "python -c \"import sys; del sys.path[0];\\ + import os.path as op, re, django.conf;\\ bn=op.basename(op.abspath(op.curdir));[sys\\ .stdout.write(str(re.sub(r'^%s\.(.*?)$' % bn, r'\1', i)) + '\n') for i in django.conf.settings.\\ -- cgit v1.2.3-70-g09d2