Skip to content

Commit

Permalink
Fix #4
Browse files Browse the repository at this point in the history
  • Loading branch information
ibonn committed Jul 14, 2024
1 parent 2316341 commit cadeb2b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion python_avatars/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,14 @@ def uninstall_part(part: AvatarPart, confirm: bool = True) -> bool:
:return: bool
"""
if _prompt_uninstall_confirmation(part.__class__.__name__, part.name) and _uninstall_enum(part, AvatarPart):
if confirm:
if _prompt_uninstall_confirmation(part.__class__.__name__, part.name):
return _uninstall_part(part)
return False


def _uninstall_part(part: AvatarPart) -> bool:
if _uninstall_enum(part, AvatarPart):
os.remove(_get_path(part.__class__, part.value))
return True
return False
Expand Down

0 comments on commit cadeb2b

Please sign in to comment.