MCPcopy
hub / github.com/iBaa/PlexConnect / checkSetting

Method checkSetting

ATVSettings.py:143–157  ·  view source on GitHub ↗
(self, UDID, option)

Source from the content-addressed store, hash-verified

141 self.cfg.set(UDID, option, val)
142
143 def checkSetting(self, UDID, option):
144 self.checkSection(UDID)
145 val = self.cfg.get(UDID, option)
146 opts = options[option]
147
148 # check val in list
149 found = False
150 for opt in opts:
151 if fnmatch.fnmatch(val, opt):
152 found = True
153
154 # if not found, correct to default
155 if not found:
156 self.cfg.set(UDID, option, opts[0])
157 dprint(__name__, 1, "checksetting: default {0} to {1}", option, opts[0])
158
159 def toggleSetting(self, UDID, option):
160 self.checkSection(UDID)

Callers

nothing calls this directly

Calls 2

checkSectionMethod · 0.95
dprintFunction · 0.85

Tested by

no test coverage detected