Skip to content

Commit

Permalink
update_api.py: Remove usage of MKException.
Browse files Browse the repository at this point in the history
This wasn't working as it was being accessed from a function object
rather than the module.

Instead, let's just print the error and exit.
  • Loading branch information
waywardmonkeys authored and NikolajBjorner committed Aug 4, 2022
1 parent 8a3556e commit a3161bd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/update_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
language bindings.
"""

import mk_exception
import argparse
import logging
import re
Expand Down Expand Up @@ -1700,8 +1699,8 @@ def def_APIs(api_files):
m = pat2.match(line)
if m:
eval(line)
except Exception:
raise mk_exec_header.MKException("Failed to process API definition: %s" % line)
except Exception as e:
error('ERROR: While processing: %s: %s\n' % (e, line))

def write_log_h_preamble(log_h):
log_h.write('// Automatically generated file\n')
Expand Down

0 comments on commit a3161bd

Please sign in to comment.