resolve new path for openpower/isa markdown
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Apr 2021 13:04:52 +0000 (14:04 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Apr 2021 13:04:52 +0000 (14:04 +0100)
src/openpower/decoder/pseudo/pagereader.py

index ea1b6653f40765c5b5a0878fea6456c28aa52a62..dabfec2141ef45a169942c5ad77b41f77dbb16b4 100644 (file)
@@ -58,7 +58,8 @@ def get_isa_dir():
     fdir = os.path.split(fdir)[0]
     fdir = os.path.split(fdir)[0]
     fdir = os.path.split(fdir)[0]
-    return os.path.join(fdir, "libreriscv", "openpower", "isa")
+    print (fdir)
+    return os.path.join(fdir, "openpower", "isa")
 
 
 class ISA:
@@ -68,10 +69,12 @@ class ISA:
         self.forms = {}
         self.page = {}
         for pth in os.listdir(os.path.join(get_isa_dir())):
-            print(get_isa_dir(), pth)
+            print("examining", get_isa_dir(), pth)
             if "swp" in pth:
                 continue
-            assert pth.endswith(".mdwn"), "only %s in isa dir" % pth
+            if not pth.endswith(".mdwn"):
+                print ("warning, file not .mdwn, skipping", pth)
+                continue
             self.read_file(pth)
             continue
             # code which helped add in the keyword "Pseudo-code:" automatically