mirror of
https://github.com/powerline/powerline.git
synced 2025-04-08 19:25:04 +02:00
Pop first path from sys.path
According to the `sys.path` documentation “As initialized upon program startup, the first item of this list, path[0], is the directory containing the script that was used to invoke the Python interpreter.” Since client is named `powerline.py` it tries to use the client itself as powerline module and obviously fails to import `lib` submodule.
This commit is contained in:
parent
849fef9b5a
commit
7f5c0d660d
@ -12,6 +12,9 @@ try:
|
||||
except ImportError:
|
||||
from os import environ
|
||||
|
||||
# XXX Hack for importing powerline modules to work.
|
||||
sys.path.pop(0)
|
||||
|
||||
try:
|
||||
from powerline.lib.encoding import get_preferred_output_encoding
|
||||
except ImportError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user