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
fb3abaa6a5
commit
50f0fbb421
@ -16,6 +16,8 @@ New Features
|
||||
Changes
|
||||
-------
|
||||
|
||||
* Give more detailed error when encountering a corrupt UID mapping file.
|
||||
|
||||
Bug Fixes
|
||||
---------
|
||||
|
||||
|
@ -45,7 +45,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)
|
||||
|
Loading…
Reference in New Issue
Block a user