Handle undefined mux modes
authorBrad Griffis <bgriffis@ti.com>
Tue, 29 Jan 2019 18:05:37 +0000 (12:05 -0600)
committerBrad Griffis <bgriffis@ti.com>
Tue, 29 Jan 2019 18:05:37 +0000 (12:05 -0600)
padconf/am57xx-padconf-decoder.py

index 1c9e21cdb914162640ac680e826e0f6cb5676e08..bb00b5e6b60345028922bd94379e10b84445a7f0 100755 (executable)
@@ -130,7 +130,11 @@ for lines in rd1:
         mymux = myregister.find("./bitfield[@begin='3']")
         if mymux is not None:
             myselection = mymux.find(mySearchExpression2 % muxmode)
-            muxmode_description = myselection.get('description')
+            if myselection is not None:
+                muxmode_description = myselection.get('description')
+            else:
+                muxmode_description = "Undefined!"
+                comments += "Illegal muxmode selected; "
         else:
             muxmode_description = "-"