diff --git a/neopi.py b/neopi.py index 457759a..7ef8a57 100755 --- a/neopi.py +++ b/neopi.py @@ -306,13 +306,17 @@ def search_file_path(self, args, valid_regex): for root, dirs, files in os.walk(args[0]): for file in files: filename = os.path.join(root, file) - if (valid_regex.search(file) and os.path.getsize(filename) > SMALLEST): + try: + if (valid_regex.search(file) and os.path.getsize(filename) > SMALLEST): try: data = open(root + "/" + file, 'rb').read() except: data = False print "Could not read file :: %s/%s" % (root, file) yield data, filename + except: + pass + if __name__ == "__main__": """Parse all the options"""