4 from .policy
import Policy
12 type = self.getValueType(name)
13 if (type == self.UNDEF):
14 return self.getInt(name)
17 if (type == self.INT):
18 return self.getInt(name)
19 elif (type == self.DOUBLE):
20 return self.getDouble(name)
21 elif (type == self.BOOL):
22 return self.getBool(name)
23 elif (type == self.STRING):
24 return self.getString(name)
25 elif (type == self.POLICY):
26 return self.getPolicy(name)
27 elif (type == self.FILE):
28 return self.getFile(name)
31 type = self.getValueType(name)
32 if (type == self.UNDEF):
33 return self.getIntArray(name)
36 if (type == self.INT):
37 return self.getIntArray(name)
38 elif (type == self.DOUBLE):
39 return self.getDoubleArray(name)
40 elif (type == self.BOOL):
41 return self.getBoolArray(name)
42 elif (type == self.STRING):
43 return self.getStringArray(name)
44 elif (type == self.POLICY):
45 return self.getPolicyArray(name)
46 elif (type == self.FILE):
47 return self.getFileArray(name)
49 def set(self, name, value):
51 raise RuntimeError(
"Attempt to set value of \"" + name +
52 "\" to None. Values must be non-None. Use remove() instead.")
54 self._set(name, value)
def set(self, name, value)