Skip to content

Commit

Permalink
FileNotFoundError doesn't exist in Python 2
Browse files Browse the repository at this point in the history
Work around it in the same way we do in fusesoc: map FileNotFoundError
to OSError for Python 2.
  • Loading branch information
imphil authored and olofk committed Aug 27, 2019
1 parent 3f00d95 commit dcf5607
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions edalize/edatool.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

logger = logging.getLogger(__name__)

if sys.version[0] == '2':
FileNotFoundError = OSError

# Jinja2 tests and filters, available in all templates
def jinja_filter_param_value_str(value, str_quote_style="", bool_is_str=False):
""" Convert a parameter value to string suitable to be passed to an EDA tool
Expand Down

0 comments on commit dcf5607

Please sign in to comment.