MCPcopy Create free account
hub / github.com/ActiveState/code / lessfound

Function lessfound

recipes/Python/576627_BlueMon/recipe-576627.py:30–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 test.append(v)#---------------------the test tempory list
29
30def lessfound():#-------------------------Used if the scan just done has less items than the last scan.
31 for x in lastscan:#-------------------Step through the items in the last scan list
32 c=0#------------------------------ and reset the counter
33 for v in scan:#-------------------- Step through the items in the list from the scan just done.
34 if (v==x):#---------------------IF device name matches in both lists
35 c=c+1#------------------------then increment the match counter.
36 if (c==0):#-------------------------IF the counter remains zero then device name is new
37 test.append(x)#------------------so add it to the tempory list
38
39def samefound():#---------------------------------used as a sanity check when the status of devices is the same.
40 pass

Callers 1

recipe-576627.pyFile · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected