From a5c3ddb053bde39e266660770ba575c6e325b658 Mon Sep 17 00:00:00 2001 From: Fabien Poussin Date: Thu, 11 May 2017 14:40:18 +0200 Subject: mx2board fix --- tools/mx2board.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/mx2board.py b/tools/mx2board.py index 8b0bba2..16d1ecf 100644 --- a/tools/mx2board.py +++ b/tools/mx2board.py @@ -6,7 +6,7 @@ __version__ = '0.3' from xml.etree import ElementTree as etree from jinja2 import Template -from os.path import expanduser, sep +from os.path import expanduser, sep, dirname from argparse import ArgumentParser import re import pprint @@ -328,7 +328,7 @@ if __name__ == '__main__': defines = gen_defines(proj) ports = gen_ports(gpio, proj) - with open('board_gpio.tpl', 'r') as tpl_file: + with open(dirname(__file__) + '/board_gpio.tpl', 'r') as tpl_file: tpl = tpl_file.read() template = Template(tpl) -- cgit v1.2.3