Skip to content

Commit 33fd0ae

Browse files
committed
Fixed #141
The error was cased by the 'None' value of the 'template_path' from template_dir = os.path.dirname(template_path)
1 parent a9f0447 commit 33fd0ae

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

about_code_tool/about.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,9 +1224,7 @@ def write_to_csv(self, output_path):
12241224
row_data = about_object.get_row_data(relative_path, custom_keys)
12251225
csv_writer.writerow(row_data)
12261226

1227-
def generate_attribution(self,
1228-
template_path='templates/default.html',
1229-
limit_to=None):
1227+
def generate_attribution(self, template_path, limit_to=None):
12301228
"""
12311229
Generate an attribution file from the current list of ABOUT objects.
12321230
The optional `limit_to` parameter allows to restrict the generated

about_code_tool/genattrib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ def main(parser, options, args):
133133
overwrite = options.overwrite
134134
verbosity = options.verbosity
135135
mapping_config = options.mapping
136-
template_location = options.template_location
136+
template_location = options.template_location \
137+
if options.template_location else "templates/default.html"
137138

138139
if options.version:
139140
print('ABOUT tool {0}\n{1}'.format(__version__, __copyright__))

0 commit comments

Comments
 (0)