Skip to content

Commit e395b33

Browse files
committed
small fix for unit test
Signed-off-by: Stephen L. <lrq3000@gmail.com>
1 parent f7cb3b0 commit e395b33

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pyFileFixity/_infos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
__email__ = 'LRQ3000@gmail.com'
55

66
# Definition of the version number
7-
version_info = 2, 3, 0 # major, minor, patch, extra
7+
version_info = 2, 3, 1 # major, minor, patch, extra
88

99
# Nice string for the version (mimic how IPython composes its version str)
1010
__version__ = '-'.join(map(str, version_info)).replace('-', '.').strip('-')

pyFileFixity/replication_repair.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def majority_vote_byte_scan(relfilepath, fileslist, outpath, blocksize=65535, de
218218

219219
# Errors signaling
220220
if errors:
221-
error_msg = "Unrecoverable corruptions (because of ambiguity) in file %s on characters: %s." % (relfilepath, [hex(x) for x in errors]) # Signal to user that this file has unrecoverable corruptions (he may try to fix the bits manually or with his own script)
221+
error_msg = "Unrecoverable corruptions (because of ambiguity) in file %s on characters: %s." % (relfilepath, [hex(int(x)) for x in errors]) # Signal to user that this file has unrecoverable corruptions (he may try to fix the bits manually or with his own script)
222222
return (1, error_msg) # return an error
223223
# Close all input files
224224
for fh in fileshandles:

pyFileFixity/tests/test_replication_repair.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def quote_paths(inputpaths):
265265
tamper_file(fileout2[2], 0, "A")
266266

267267
# Replication repair using rfigc database to check results
268-
res3 = "filepath|dir1|dir2|dir3|dir4|hash-correct|error_code|errors\ntestaa.txt|X|X|-|X|KO|KO| File could not be totally repaired according to rfigc database.\ntuxsmall.jpg|X|X|X|X|OK|KO|Unrecoverable corruptions (because of ambiguity) in file tuxsmall.jpg on characters: ['0xaL']. But merged file is correct according to rfigc database.\nsub/testsub.txt|-|-|O|-|OK|OK|-\n"
268+
res3 = "filepath|dir1|dir2|dir3|dir4|hash-correct|error_code|errors\ntestaa.txt|X|X|-|X|KO|KO| File could not be totally repaired according to rfigc database.\ntuxsmall.jpg|X|X|X|X|OK|KO|Unrecoverable corruptions (because of ambiguity) in file tuxsmall.jpg on characters: ['0xa']. But merged file is correct according to rfigc database.\nsub/testsub.txt|-|-|O|-|OK|OK|-\n"
269269
ptee = StringIO()
270270
errcode = rep.synchronize_files(inputpaths, outpath, database=filedb, report_file=report_file, ptee=ptee)
271271
assert errcode == 1

0 commit comments

Comments
 (0)