In case there is broken symlink (a link without a target) the script just stops with this error:
Traceback (most recent call last):
File "/usr/bin/flickrsmartsync", line 9, in
load_entry_point('flickrsmartsync==0.2.1.post0', 'console_scripts', 'flickrsmartsync')()
File "/usr/lib/python2.7/site-packages/flickrsmartsync-0.2.1.post0-py2.7.egg/flickrsmartsync/init.py", line 73, in main
sync.start_sync()
File "/usr/lib/python2.7/site-packages/flickrsmartsync-0.2.1.post0-py2.7.egg/flickrsmartsync/sync.py", line 33, in start_sync
self.upload()
File "/usr/lib/python2.7/site-packages/flickrsmartsync-0.2.1.post0-py2.7.egg/flickrsmartsync/sync.py", line 118, in upload
photo_sets = self.local.build_photo_sets(only_dir, EXT_IMAGE + EXT_VIDEO)
File "/usr/lib/python2.7/site-packages/flickrsmartsync-0.2.1.post0-py2.7.egg/flickrsmartsync/local.py", line 48, in build_photo_sets
file_stat = os.stat(file_path)
OSError: [Errno 2] No such file or directory: '/media/FOO'
Is it possible to just surround it with a try catch?
In case there is broken symlink (a link without a target) the script just stops with this error:
Traceback (most recent call last): File "/usr/bin/flickrsmartsync", line 9, in
load_entry_point('flickrsmartsync==0.2.1.post0', 'console_scripts', 'flickrsmartsync')()
File "/usr/lib/python2.7/site-packages/flickrsmartsync-0.2.1.post0-py2.7.egg/flickrsmartsync/init.py", line 73, in main
sync.start_sync()
File "/usr/lib/python2.7/site-packages/flickrsmartsync-0.2.1.post0-py2.7.egg/flickrsmartsync/sync.py", line 33, in start_sync
self.upload()
File "/usr/lib/python2.7/site-packages/flickrsmartsync-0.2.1.post0-py2.7.egg/flickrsmartsync/sync.py", line 118, in upload
photo_sets = self.local.build_photo_sets(only_dir, EXT_IMAGE + EXT_VIDEO)
File "/usr/lib/python2.7/site-packages/flickrsmartsync-0.2.1.post0-py2.7.egg/flickrsmartsync/local.py", line 48, in build_photo_sets
file_stat = os.stat(file_path)
OSError: [Errno 2] No such file or directory: '/media/FOO'
Is it possible to just surround it with a try catch?