8000 Merge pull request #1157 from tatokis/mount-exception-fix · Develop-Python/backintime@1511422 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1511422

Browse files
authored
Merge pull request bit-team#1157 from tatokis/mount-exception-fix
Fix FileNotFoundError exception in mount.mounted
2 parents 25293c8 + b75dd64 commit 1511422

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

common/mount.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,11 @@ def mounted(self):
607607
if os.path.ismount(self.currentMountpoint):
608608
return True
609609
else:
610-
if os.listdir(self.currentMountpoint):
611-
raise MountException(_('mountpoint %s not empty.') % self.currentMountpoint)
610+
try:
611+
if os.listdir(self.currentMountpoint):
612+
raise MountException(_('mountpoint %s not empty.') % self.currentMountpoint)
613+
except FileNotFoundError:
614+
pass
612615
return False
613616

614617
def createMountStructure(self):

0 commit comments

Comments
 (0)
0