More detailed error output on corrupt UID mapping files
This function will need much more "robustifying", but the very least we can do is to print the file name and line that are giving trouble. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:

committed by
Nicolas Sebrecht

parent
12e11429b5
commit
2ed1c357a0
@ -51,7 +51,11 @@ class MappingFolderMixIn:
|
||||
line = file.readline()
|
||||
if not len(line):
|
||||
break
|
||||
line = line.strip()
|
||||
try:
|
||||
line = line.strip()
|
||||
except ValueError:
|
||||
raise Exception("Corrupt line '%s' in UID mapping file '%s'" \
|
||||
%(line, mapfilename))
|
||||
(str1, str2) = line.split(':')
|
||||
loc = long(str1)
|
||||
rem = long(str2)
|
||||
|
Reference in New Issue
Block a user