Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give error message on unmount failure #668

Merged
merged 8 commits into from
Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/vorta/views/archive_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,17 @@ def umount_action(self):

def umount_result(self, result):
self._toggle_all_buttons(True)
archive_name = result['params']['current_archive']
if result['returncode'] == 0:
self._set_status(self.tr('Un-mounted successfully.'))
archive_name = result['params']['current_archive']
self._set_status(self.tr('Unmounted successfully.'))
samuel-w marked this conversation as resolved.
Show resolved Hide resolved
del self.mount_points[archive_name]
self.update_mount_button_text()
row = self.row_of_archive(archive_name)
item = QTableWidgetItem('')
self.archiveTable.setItem(row, 3, item)
else:
self._set_status(
self.tr(f'Unmounting failed. Make sure no programs are using {self.mount_points.get(archive_name)}'))
samuel-w marked this conversation as resolved.
Show resolved Hide resolved

def save_prune_setting(self, new_value=None):
profile = self.profile()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_archives.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def psutil_disk_partitions(**kwargs):
qtbot.waitUntil(lambda: tab.mountErrors.text().startswith('Mounted'), timeout=10000)

qtbot.mouseClick(tab.mountButton, QtCore.Qt.LeftButton)
qtbot.waitUntil(lambda: tab.mountErrors.text().startswith('Un-mounted successfully.'), timeout=10000)
qtbot.waitUntil(lambda: tab.mountErrors.text().startswith('Unmounted successfully.'), timeout=10000)


def test_archive_extract(qapp, qtbot, mocker, borg_json_output, monkeypatch):
Expand Down