Skip to content

Commit

Permalink
refactor: Use show_error function instead of dialogs.ErrorDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilez0 committed Apr 18, 2024
1 parent ccd3594 commit f9b08f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions live-installer/frontend/partitioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,20 +222,20 @@ def create_subvolume_dialog(widget):
response_is_ok, subvolume_name, mount_as = dlg.show()
if response_is_ok:
if subvolume_name == "" or "/" in subvolume_name or " " in subvolume_name:
dialogs.ErrorDialog(_("Installer"), _(
show_error(_(
"The name of a subvolume must not be blank or contain a space or a forward slash"))
return
if " " in mount_as:
dialogs.ErrorDialog(_("Installer"), _(
show_error(_(
"The mount point of a subvolume must not contain a space"))
return
for subvol in partition.subvolumes:
if subvol.name == subvolume_name:
dialogs.ErrorDialog(_("Installer"), _(
show_error(_(
"Subvolume with name '%s' already exists") % subvolume_name)
return
if subvol.mount_as == mount_as and subvol.mount_as != "":
dialogs.ErrorDialog(_("Installer"), _(
show_error(_(
"Subvolume with mount point '%s' already exists") % mount_as)
return
subvolume = BtrfsSubvolume()
Expand Down

0 comments on commit f9b08f2

Please sign in to comment.