opnsense-ports/math/qtiplot/files/patch-qtiplot_qtiplotrc.py
Franco Fichtner 9ef8daf370 */*: sync with upstream
Taken from: HardenedBSD
2018-04-06 12:58:11 +02:00

14 lines
384 B
Python

--- qtiplot/qtiplotrc.py.orig 2011-07-06 06:37:50 UTC
+++ qtiplot/qtiplotrc.py
@@ -37,7 +37,10 @@ def import_to_global(modname, attrs=None
"""
import sys
import os
- sys.path.append(os.path.dirname(__file__))
+ try:
+ sys.path.append(os.path.dirname(__file__))
+ except:
+ pass
mod = __import__(modname)
for submod in modname.split(".")[1:]:
mod = getattr(mod, submod)