Commit 5e1315ef authored by Daniel Armbruster's avatar Daniel Armbruster Committed by thomas.forbriger
Browse files

checksumline adjusted and prepared for result logging mechanism

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: 4374
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 24b11971
......@@ -301,8 +301,6 @@ class CsLine:
self.creationDateFile = argList[3]
self.creationLocationChecksum = argList[4]
self.creationDateChecksum = argList[5]
self.dateLastCheck = argList[6]
self.statusLastCheck = argList[7]
self.path = args[1]
elif isinstance(args[0], str) and isinstance(args[1], str) and \
isinstance(args[2], str):
......@@ -313,8 +311,6 @@ class CsLine:
self.creationDateFile = ''
self.creationLocationChecksum = ''
self.creationDateChecksum = ''
self.dateLastCheck = ''
self.statusLastCheck = ''
else:
CsFileError(325, "Invalid argument(s).")
......@@ -347,8 +343,6 @@ class CsLine:
"%Y/%m/%d-%H:%M:%S")
self.creationLocationChecksum = os.uname()[1]
self.creationDateChecksum = datetime.now().strftime("%Y/%m/%d-%H:%M:%S")
self.dateLastCheck = self.creationDateChecksum
self.statusLastCheck = 'ok'
def check(self, src, beTolerant=False):
"""
......@@ -389,10 +383,9 @@ class CsLine:
"""
String representation of a checksum line.
"""
return '{0} {1} {2} {3} {4} {5} {6} {7}'.format(self.checksum, \
self.filename, self.hashfunc, self.creationDateFile, \
self.creationLocationChecksum, self.creationDateChecksum, \
self.dateLastCheck, self.statusLastCheck)
return '{0} {1} {2} {3} {4} {5}'.format(self.checksum, self.filename, \
self.hashfunc, self.creationDateFile, self.creationLocationChecksum, \
self.creationDateChecksum)
# -----------------------------------------------------------------------------
# Tests
......
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