mirror of
https://github.com/frej/fast-export.git
synced 2025-11-02 17:25:48 +01:00
hg2git.py: Remove leading/trailing spaces from authormap
The current regex may leave us with keys/values having trailing/leading spaces in all flavours which will break lookup. Solution: strip() key and value. Signed-off-by: Rocco Rutte <pdmef@gmx.net>
This commit is contained in:
@@ -278,7 +278,7 @@ def load_authors(filename):
|
|||||||
sys.stderr.write('Invalid file format in [%s], line %d\n' % (filename,l))
|
sys.stderr.write('Invalid file format in [%s], line %d\n' % (filename,l))
|
||||||
continue
|
continue
|
||||||
# put key:value in cache, key without ^:
|
# put key:value in cache, key without ^:
|
||||||
cache[m.group(1)]=m.group(2)
|
cache[m.group(1).strip()]=m.group(2).strip()
|
||||||
f.close()
|
f.close()
|
||||||
sys.stderr.write('Loaded %d authors\n' % l)
|
sys.stderr.write('Loaded %d authors\n' % l)
|
||||||
return cache
|
return cache
|
||||||
|
|||||||
Reference in New Issue
Block a user