Skip to content

Commit

Permalink
Make CAPI version available in Core classes
Browse files Browse the repository at this point in the history
This makes introspection slightly easier, since both classes are
identically named.
  • Loading branch information
imphil authored and olofk committed Mar 4, 2020
1 parent f59066f commit 8573f84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fusesoc/capi1/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def __str__(self):


class Core:
capi_version = 1

def __init__(self, core_file, cache_root=""):
basename = os.path.basename(core_file)
self.depend = []
Expand Down
2 changes: 2 additions & 0 deletions fusesoc/capi2/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ def __new__(cls, *args, **kwargs):


class Core:
capi_version = 2

def __init__(self, core_file, cache_root=""):
basename = os.path.basename(core_file)

Expand Down

0 comments on commit 8573f84

Please sign in to comment.