Show More
@@ -23,6 +23,22 b' def check(name, desc):' | |||
|
23 | 23 | return func |
|
24 | 24 | return decorator |
|
25 | 25 | |
|
26 | def checkvers(name, desc, vers): | |
|
27 | """Registers a check function for each of a series of versions. | |
|
28 | ||
|
29 | vers can be a list or an iterator""" | |
|
30 | def decorator(func): | |
|
31 | def funcv(v): | |
|
32 | def f(): | |
|
33 | return func(v) | |
|
34 | return f | |
|
35 | for v in vers: | |
|
36 | v = str(v) | |
|
37 | f = funcv(v) | |
|
38 | checks['%s%s' % (name, v.replace('.', ''))] = (f, desc % v) | |
|
39 | return func | |
|
40 | return decorator | |
|
41 | ||
|
26 | 42 | def checkfeatures(features): |
|
27 | 43 | result = { |
|
28 | 44 | 'error': [], |
General Comments 0
You need to be logged in to leave comments.
Login now