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:
parent
12e11429b5
commit
2ed1c357a0
@ -16,6 +16,8 @@ New Features
|
||||
Changes
|
||||
-------
|
||||
|
||||
* Give more detailed error when encountering a corrupt UID mapping file.
|
||||
|
||||
Bug Fixes
|
||||
---------
|
||||
|
||||
|
@ -51,7 +51,11 @@ class MappingFolderMixIn:
|
||||
line = file.readline()
|
||||
if not len(line):
|
||||
break
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user