Closedown
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
SCAN_INDEX = 1
|
||||
|
||||
|
||||
def get_scan_index():
|
||||
try:
|
||||
return int(get_setting("ScanIndex")
|
||||
except:
|
||||
return 1
|
||||
|
||||
def processScanPars_decorator(func):
|
||||
def wrapper(scan, pars):
|
||||
global SCAN_INDEX
|
||||
if 'name' not in pars:
|
||||
set_exec_pars(name=str(SCAN_INDEX))
|
||||
SCAN_INDEX = SCAN_INDEX+1
|
||||
index = get_scan_index():
|
||||
set_exec_pars(name=str(index))
|
||||
set_setting("ScanIndex", index+1)
|
||||
func(scan, pars)
|
||||
return wrapper
|
||||
|
||||
|
||||
Reference in New Issue
Block a user