Skip to content

Commit

Permalink
Merge 7db6774 into 5748edd
Browse files Browse the repository at this point in the history
  • Loading branch information
mbafford committed Oct 18, 2020
2 parents 5748edd + 7db6774 commit cd393b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion beancount_import/source/generic_importer_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ def __init__(self,
)
]
# filter the valid files for this importer
self.files = [f for f in files if self.importer.identify(f)]
# handle the fact that importer.identify could raise an exception
# instead of returning False, but that ultimately means False for this purpose
def try_identify(importer, file):
try: return importer.identify(file)
except: return False
self.files = [f for f in files if try_identify(self.importer, f ) ]

@property
def name(self) -> str:
Expand Down

0 comments on commit cd393b4

Please sign in to comment.