diff options
-rw-r--r-- | scripts/qapi/common.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index 5abab44..9d5c05f 100644 --- a/scripts/qapi/common.py +++ b/scripts/qapi/common.py @@ -391,8 +391,9 @@ class QAPIDoc(object): class QAPISchemaParser(object): - def __init__(self, fname, previously_included=[], incl_info=None): - previously_included.append(os.path.abspath(fname)) + def __init__(self, fname, previously_included=None, incl_info=None): + previously_included = previously_included or set() + previously_included.add(os.path.abspath(fname)) try: if sys.version_info[0] >= 3: |