X-Git-Url: https://git.sthu.org/?p=sitarba.git;a=blobdiff_plain;f=sitarba;h=3ff4bfff4754abd7fd37c110f803315cfefb3a8f;hp=c236ba0589e68018b41991ba3231ef40b6396ed3;hb=5d9e2e7e23bf0b5926f1681bc3991632fe0140a7;hpb=a7b16d89012002bb484cfdab6304dd89aee0efed diff --git a/sitarba b/sitarba index c236ba0..3ff4bff 100755 --- a/sitarba +++ b/sitarba @@ -224,6 +224,10 @@ class Config: 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 @@ -267,6 +271,11 @@ class Config: 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 = []