Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc49ab28 authored by Myles Watson's avatar Myles Watson
Browse files

Escape MMIs that are not Python identifiers

Map 6000 -> _mmi_6000

Bug: 239453735
Test: atest pts-bot:SDP/SR/SA/BV-20-C -v
Change-Id: I89181fa2a082b000a9b210cbfb4f5136999706b6
parent 82b06cbe
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -35,6 +35,8 @@ class ProfileProxy:
            AttributeError: the MMI is not implemented.
            AttributeError: the MMI is not implemented.
        """
        """
        try:
        try:
            if not mmi_name.isidentifier():
                mmi_name = "_mmi_" + mmi_name
            return getattr(self, mmi_name)(
            return getattr(self, mmi_name)(
                test=test, description=mmi_description, pts_addr=pts_addr)
                test=test, description=mmi_description, pts_addr=pts_addr)
        except AttributeError:
        except AttributeError: