Commit 13e538a3 authored by Daniel Armbruster's avatar Daniel Armbruster Committed by thomas.forbriger
Browse files

Bugs fixed. Tested now.

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: 4376
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 8949577e
......@@ -166,7 +166,8 @@ def main(argv=None):
if verbose or debugMode:
logger.addHandler(console)
if 1 == len(args):
if 1 == len(args) or 2 == len(args) and \
args[0].rstrip(os.sep)+os.sep == args[1].rstrip(os.sep)+os.sep:
sourcepath = str(args[0]).rstrip(os.sep)+os.sep
sourceDirs = [sourcepath]
inputpath = sourcepath
......@@ -190,11 +191,11 @@ def main(argv=None):
csfile.getSubDirectories(inputpath, regexes, followLinks))
if len(sourceDirs) != len(inputDirs):
raise Error(193, \
raise Error(194, \
"Directory structure of inputpath and sourcepath different.")
if not csfile.hasCsFile(inputpath):
raise Error(197,"PATH does not contain a checksumfile.")
raise Error(198,"PATH does not contain a checksumfile.")
paths = list(zip(inputDirs, sourceDirs))
......
......@@ -237,7 +237,7 @@ class CsFile:
using the update function.
"""
if 0 == len(self.__cslines):
self.logger.debug( \
self.logger.info( \
"CSFILE does not contain any lines or had not been read yet.")
# configure handler for logger
# checksumfile.result filesize 15 kB each with 3 files
......@@ -257,14 +257,14 @@ class CsFile:
cslinesSet = set(self.__cslines)
for regex in regexes:
matching = set(csline for csline in self.__cslines \
if None != re.match(regex, csline.path))
if None != re.match(regex, csline.filename))
cslinesSet -= matching
# perform check
self.logger.debug("Start checking checksums ...")
for csline in self.__cslines:
if csline in cslinesSet:
self.logger.debug( \
"Performing check of file '{0}' with csline in checksumfile '{1}'.",\
"Performing check of file '%s' with csline in checksumfile '%s'.", \
os.path.join(csline.srcdir,csline.filename), self.filedir)
csline.check(resultLogger, beTolerant)
self.logger.debug("Finished checking checksums.")
......
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