Add a new element to the variable.
118 def add(self, value, prepend=True):
119 msg.debug('Adding new value "{0}" to envvar {1} (currently {2}'.format(value, self._name, self._value))
120 if value in self._value:
121 msg.warning('Attempt to add environment element {0} twice to {1}'.format(value, self._name))
122 if self._testExistance:
123
124 test_value = value
125 if '$' in test_value:
126 test_value = os.path.join(os.environ[os.path.dirname(value)[1:]], os.path.basename(value))
127 if not os.access(test_value, os.R_OK):
128 msg.warning("Path to {0} is not readable - will not add it to {1}".format(value, self._name))
129 return
130 if prepend:
131 self._value[0:0] = [value]
132 else:
133 self._value.append(value)
134
bool add(const std::string &hname, TKey *tobj)