Commit 1d6b1145 authored by Daniel Armbruster's avatar Daniel Armbruster Committed by thomas.forbriger
Browse files

Corrections due to new requirements

This is a legacy commit from before 2015-05-18.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.

SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 4156
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 13708fd1
......@@ -110,7 +110,7 @@ class Processor():
configfile = open(self.__configfile)
try:
lines = [line.rstrip() for line in configfile \
if line != '' and line[0] != '#']
if len(line.rstrip()) and line[0] != '#']
finally:
configfile.close()
if len(lines) < 2:
......@@ -132,7 +132,7 @@ class Processor():
raise Error("No setting lines in CONFIGFILE given.")
for line in lines:
l = line.split(" ")
if not os.path.isdir(l[1]):
if len(l) >= 2 and not os.path.isdir(l[1]):
raise Error(l[1] + " is not a directory.")
if len(l) == 3 and os.path.isdir(l[2]):
l.insert(2,'')
......@@ -172,14 +172,14 @@ class Processor():
e_flags = []
if self.__keylist[3] in line_dict:
# backup is desired - use rsync
s += "csbackgen"
for f in e_flags:
s += " " + self.__flags[3] + " '" + f + "'"
s += " " + line_dict[self.__keylist[1]] + "; rsync"
s += "rsync"
for f in e_flags:
s += " --exclude '" + f + "'"
s += " " + line_dict[self.__keylist[1]] + " " +\
line_dict[self.__keylist[3]]
s += " " + line_dict[self.__keylist[1]] + " " + \
line_dict[self.__keylist[3]] + "; csbackgen"
for f in e_flags:
s += " " + self.__flags[3] + " '" + f + "'"
s += " " + line_dict[self.__keylist[3]]
# check of integrity is desired
if not flags[self.__flags[2]]:
s += "; csbackchk"
......@@ -211,8 +211,9 @@ class Processor():
res = dict.fromkeys(self.__flags, False)
res[self.__flags[3]] = ''
l = flags.split()
# get only True/False flags
for f in self.__flags[:3]:
if str(f) in l:
if f in l:
res[f] = True
# handle exclude flags
for e_flag in l:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment