summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@us.ibm.com>2016-11-10 17:10:46 -0500
committerBrad Bishop <bradleyb@us.ibm.com>2016-11-16 23:17:08 -0500
commitccacc4af969a70cc24f84981b5a5dde01a928d09 (patch)
treedf0b97d2307f243de1acbbc816a1fc252c7851c7 /tools
parent14275cfd5c9e1ef4dc47a0fb66b654dbe3e48700 (diff)
downloadsdbusplus-ccacc4af969a70cc24f84981b5a5dde01a928d09.tar.gz
sdbusplus-ccacc4af969a70cc24f84981b5a5dde01a928d09.zip
sdbus++: find templates in datadir
Change-Id: Ib6ffd1ad51774825fe7227fc8ce48447bfd5b1f8 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/sdbus++4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/sdbus++ b/tools/sdbus++
index 9f7d111..2e4e330 100755
--- a/tools/sdbus++
+++ b/tools/sdbus++
@@ -7,6 +7,8 @@ import os
def main():
+ module_path = os.path.dirname(sdbusplus.__file__)
+
valid_types = {'interface': sdbusplus.Interface}
valid_processes = {'markdown': "markdown",
'server-header': "server_header",
@@ -17,7 +19,7 @@ def main():
parser.add_argument('-r', '--rootdir', dest='rootdir', default='example',
type=str, help='Location of files to process.')
parser.add_argument('-t', '--templatedir', dest='templatedir',
- default=os.path.join('sdbusplus', 'templates'),
+ default=os.path.join(module_path, 'templates'),
type=str, help='Location of templates files.')
parser.add_argument('typeName', metavar='TYPE', type=str,
choices=valid_types.keys(), help='Type to operate on.')
OpenPOWER on IntegriCloud