This patch makes the RarslaveConfig class automatically return the absolute
paths to directories, even though they are not stored in the config that
way.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
# into the code, so DON'T DO IT
value = self.__get_default_val(section, key)
- # Convert config options to booleans for easier use
+ # Convert config options to native types for easier use
SAFE_EVAL = ['None', 'True', 'False', '-1', '0', '1', '2']
if value in SAFE_EVAL:
value = eval (value)
+ # Absolute-ize directories for easier use
+ if section == 'directories':
+ value = os.path.abspath (os.path.expanduser (value))
+
return value
def __init__(self):