Replace cwd var with d

This commit is contained in:
Vangelis Banos 2018-01-09 06:33:03 +00:00
parent dacfba330c
commit 3984ca017f

View File

@ -77,8 +77,8 @@ def behaviors(behaviors_dir=None):
import os, yaml, string
global _behaviors
if _behaviors is None:
cwd = behaviors_dir or os.path.dirname(__file__)
behaviors_yaml = os.path.join(cwd, 'behaviors.yaml')
d = behaviors_dir or os.path.dirname(__file__)
behaviors_yaml = os.path.join(d, 'behaviors.yaml')
with open(behaviors_yaml) as fin:
_behaviors = yaml.load(fin)
return _behaviors