Skip to content

Commit

Permalink
Merge pull request #416 from acsone/imp-gen-addon-icon-sbi
Browse files Browse the repository at this point in the history
[IMP] robustify gen-addon-icon
  • Loading branch information
pedrobaeza committed Apr 2, 2019
2 parents a62d7db + 1c7c64f commit 36453af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/gen_addon_icon.py
Expand Up @@ -27,7 +27,8 @@ def gen_one_addon_icon(icon_dir, filetype=ICON_TYPE):
if not os.path.exists(icon_dir):
os.makedirs(icon_dir)
shutil.copyfile(template_filename, icon_filename)
return icon_filename
return icon_filename
return None


@click.command()
Expand Down Expand Up @@ -71,8 +72,9 @@ def gen_addon_icon(addon_dirs, addons_dir, commit):
if exist:
continue
icon_filename = gen_one_addon_icon(icon_dir)
icon_filenames.append(icon_filename)
if commit:
if icon_filename:
icon_filenames.append(icon_filename)
if icon_filenames and commit:
commit_if_needed(icon_filenames, '[ADD] icon.%s' % ICON_TYPE)


Expand Down

0 comments on commit 36453af

Please sign in to comment.