Skip to content

Commit d861485

Browse files
committed
py2: fix FileNotFoundError does not exist [GH-5]
Thanks @3v1n0 for reporting the issue and proposing the fix.
1 parent 1a81c44 commit d861485

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compdb/includedb.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111

1212
from compdb.models import CompilationDatabaseInterface
1313

14+
try:
15+
FileNotFoundError
16+
except NameError:
17+
# py2
18+
FileNotFoundError = IOError
19+
1420
logger = logging.getLogger(__name__)
1521

1622

0 commit comments

Comments
 (0)