e = Epoch()
if name in self.epochs:
raise Config.ReadError("Epoch '{0}' already defined.".format(name))
+ p = re.compile(r'^\w+$')
+ if not p.match(name):
+ raise Config.ReadError("Epoch name '{0}' does not only " + \
+ "comprise alphanumeric characters.".format(name))
if name in Epoch.units:
e.unit = name
def _read_set(self, config, sec):
name = sec[4:].strip()
+ p = re.compile(r'^\w+$')
+ if not p.match(name):
+ raise Config.ReadError("Set name '{0}' does not only " + \
+ "comprise alphanumeric characters.".format(name))
+
dirs = []
excludes = []
# mode = full
-# Configure a user-defined epoch called 'biweek'.
+# Configure a user-defined epoch called 'biweek'. The epoch's name must
+# comprise alphanumeric characters only.
[epoch biweek]
numkeeps = 13
mode = full
-# A file set called 'home'. Each file set is packed into one archive using tar.
+# A file set called 'home'. The set's name must comprise alphanumeric
+# characters only. Each file set is packed into one archive using tar.
[set home]
# Each option starting with "dir" contains a single directory which belongs to
# this file set.