Sometimes __file__ points to the .pyc file.

This commit is contained in:
Alberto Planas 2014-09-09 13:24:53 +02:00
parent 8d507f7e73
commit 53ee90888d

View File

@ -31,7 +31,7 @@ from osc import cmdln
# Expand sys.path to search modules inside the pluging directory
PLUGINDIR = os.path.expanduser(os.path.dirname(os.path.realpath(__file__)))
PLUGINDIR = os.path.dirname(os.path.realpath(__file__.replace('.pyc', '.py')))
sys.path.append(PLUGINDIR)
from osclib.checkrepo import CheckRepo
from osclib.cycle import CycleDetector