mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
handle errors from reading project directory while looking for .sublime-project file
This commit is contained in:
parent
08172098e2
commit
82530cef4f
11
WakaTime.py
11
WakaTime.py
@ -119,10 +119,13 @@ def enough_time_passed(now, last_time):
|
||||
|
||||
|
||||
def find_project_name_from_folders(folders):
|
||||
for folder in folders:
|
||||
for file_name in os.listdir(folder):
|
||||
if file_name.endswith('.sublime-project'):
|
||||
return file_name.replace('.sublime-project', '', 1)
|
||||
try:
|
||||
for folder in folders:
|
||||
for file_name in os.listdir(folder):
|
||||
if file_name.endswith('.sublime-project'):
|
||||
return file_name.replace('.sublime-project', '', 1)
|
||||
except:
|
||||
pass
|
||||
return None
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user