- index = self["menulist"].getCurrent()[1]
- for key in ["Address", "ESSID", "Protocol", "Frequency", "Encryption key", "BitRate"]:
- if self.apList[index].has_key(key) and self.apList[index][key] is not None:
- self[key].setText((key+": "+self.apList[index][key]))
- else:
- self[key].setText((key+": None"))
+ if self["menulist"].getCurrent() is not None:
+ index = self["menulist"].getCurrent()[1]
+ for key in ["Address", "ESSID", "Protocol", "Frequency", "Encryption key", "BitRate"]:
+ if self.apList[index].has_key(key) and self.apList[index][key] is not None:
+ self[key].setText((key+": "+self.apList[index][key]))
+ else:
+ self[key].setText((key+": None"))