Skip to content

Commit

Permalink
update sshfs_mounter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
talosh committed Jan 5, 2023
1 parent d5bea68 commit 29f7f1f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions sshfs_mounter.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def unmount(local_folder_path):
local_folders = []
local_locations = []

while True:
try:
try:
while True:
current_config = get_config_data(config_folder_path)
locations = current_config.get('locations')
if not isinstance(locations, list):
Expand Down Expand Up @@ -142,15 +142,15 @@ def unmount(local_folder_path):
os.system(cmd)
except:
pass
except:
pass
finally:
for local_location in local_locations:
local_folders = [x for x in os.listdir(local_location)]

for local_folder in local_folders:
local_folder_path = os.path.join(local_location, local_folder)
unmount(local_folder_path)
except:
pass
finally:
for local_location in local_locations:
local_folders = [x for x in os.listdir(local_location)]

for local_folder in local_folders:
local_folder_path = os.path.join(local_location, local_folder)
unmount(local_folder_path)

time.sleep(poll_intervall)

0 comments on commit 29f7f1f

Please sign in to comment.