From 1f89dda4aa063fd792aaa6f70c56bd6f256fae0d Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 29 Mar 2021 19:18:33 +0100 Subject: [PATCH] sort out pywriter.py when run with no args --- src/soc/decoder/pseudo/pywriter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/soc/decoder/pseudo/pywriter.py b/src/soc/decoder/pseudo/pywriter.py index bc0f5885..77ff775e 100644 --- a/src/soc/decoder/pseudo/pywriter.py +++ b/src/soc/decoder/pseudo/pywriter.py @@ -131,15 +131,15 @@ class PyISAWriter(ISA): if __name__ == '__main__': isa = PyISAWriter() + write_isa_class = True if len(sys.argv) == 1: # quick way to do it print(dir(isa)) sources = isa.page.keys() else: sources = sys.argv[1:] - write_isa_class = True - if sources[0] == "noall": # don't rewrite all.py - write_isa_class = False - sources.pop(0) + if sources[0] == "noall": # don't rewrite all.py + write_isa_class = False + sources.pop(0) print ("sources", write_isa_class, sources) for source in sources: isa.write_pysource(source) -- 2.30.2