fix default template directory
Using pkg_resources assumes that the template files will be installed inside the python package, which they aren't. Update the default to be simply "templates", which allows someone to use the dashboard creator with: tox -e venv -- gerrit-dash-creator dashboards/cross-project.dash Change-Id: I95adbbfcc4477eac1be07f4a5beec6a8e3ae093a
This commit is contained in:
parent
5f3e5ba369
commit
ca33694ecb
|
@ -19,7 +19,6 @@ import sys
|
|||
import urllib
|
||||
|
||||
import jinja2
|
||||
import pkg_resources
|
||||
import six
|
||||
from six.moves import configparser
|
||||
|
||||
|
@ -80,9 +79,8 @@ def get_options():
|
|||
parser.add_argument('--template', default='single.txt',
|
||||
help='Name of template')
|
||||
parser.add_argument('--template-directory',
|
||||
default=pkg_resources.resource_filename(
|
||||
__name__, "templates"
|
||||
), help='Directory to scan for template files')
|
||||
default="templates",
|
||||
help='Directory to scan for template files')
|
||||
parser.add_argument('--template-file', default=None,
|
||||
help='Location of a specific template file')
|
||||
return parser.parse_args()
|
||||
|
|
Loading…
Reference in New Issue