Skip to content

Commit bbc4589

Browse files
authored
Merge pull request #478 from TimothyHarder/hardertimothy/issue-424
Issue #424 Admin channel case sensitivity
2 parents 2f59028 + 52f8e82 commit bbc4589

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

meshtastic/node.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,10 @@ def getDisabledChannel(self):
266266

267267
def _getAdminChannelIndex(self):
268268
"""Return the channel number of the admin channel, or 0 if no reserved channel"""
269-
c = self.getChannelByName("admin")
270-
if c:
271-
return c.index
272-
else:
273-
return 0
269+
for c in self.channels or []:
270+
if c.settings and c.settings.name.lower() == "admin":
271+
return c.index
272+
return 0
274273

275274
def setOwner(self, long_name=None, short_name=None, is_licensed=False):
276275
"""Set device owner name"""

0 commit comments

Comments
 (0)