Fix open addon folder

The open folder operation would break if the environment variable
LD_LIBRARY_PATH was not set
This commit is contained in:
Marcio Mazza 2016-11-28 18:01:03 -02:00
parent 6131b149da
commit e7eaf5f378

View File

@ -347,8 +347,7 @@ def openFolder(path):
if isWin:
subprocess.Popen(["explorer", path])
else:
oldlpath = os.environ.get("LD_LIBRARY_PATH")
del os.environ["LD_LIBRARY_PATH"]
oldlpath = os.environ.pop("LD_LIBRARY_PATH", None)
QDesktopServices.openUrl(QUrl("file://" + path))
if oldlpath:
os.environ["LD_LIBRARY_PATH"] = oldlpath