Skip to content

Commit 3a3d414

Browse files
committed
Add code to handle case in the genabout.py such that the user have the
'about_resource' key in the input CSV but with no value.
1 parent 1f3fc5d commit 3a3d414

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

about_code_tool/genabout.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,12 @@ def update_about_resource(self, line, about_file_exist):
544544
about_resource = line['about_file']
545545
if about_resource.endswith('/'):
546546
line['about_resource'] = '.'
547+
else: # 'about_resource' key present with no value
548+
about_resource = line['about_file']
549+
if about_resource.endswith('/'):
550+
line['about_resource'] = '.'
551+
else:
552+
line['about_resource'] = basename(about_resource)
547553
except:
548554
# Add the 'about_resource' field
549555
about_resource = line['about_file']

0 commit comments

Comments
 (0)