File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 5959 sys .exit (4 )
6060
6161__author__ = 'Hari Sekhon'
62- __version__ = '0.7.6 '
62+ __version__ = '0.7.7 '
6363
6464class MediaValidatorTool (CLI ):
6565
@@ -124,7 +124,10 @@ def run(self):
124124 else :
125125 die ("path '%s' could not be determined as either a file or directory" % arg )
126126 for arg in args :
127- self .check_path (arg )
127+ try :
128+ self .check_path (arg )
129+ except OSError as _ :
130+ print (_ )
128131 if self .failed :
129132 sys .exit (2 )
130133
@@ -134,7 +137,13 @@ def check_path(self, path):
134137 # if self.regex and self.regex.search(path):
135138 self .check_media_file (path )
136139 elif os .path .isdir (path ):
137- for item in os .listdir (path ):
140+ listing = []
141+ try :
142+ listing = os .listdir (path )
143+ listing = [x for x in listing if x [0 ] != '.' ]
144+ except OSError as _ :
145+ print (_ )
146+ for item in listing :
138147 subpath = os .path .join (path , item )
139148 if os .path .isdir (subpath ):
140149 self .check_path (subpath )
You can’t perform that action at this time.
0 commit comments