revert part of 8014 patch, pending further review
This commit is contained in:
parent
2203f28b28
commit
82294e6a82
@ -74,15 +74,11 @@ def importData(database, filename, callback=None):
|
|||||||
|
|
||||||
ansel = False
|
ansel = False
|
||||||
gramps = False
|
gramps = False
|
||||||
code_set = ''
|
|
||||||
for index in range(50):
|
for index in range(50):
|
||||||
line = ifile.readline().split()
|
line = ifile.readline().split()
|
||||||
if len(line) == 0:
|
if len(line) == 0:
|
||||||
break
|
break
|
||||||
if len(line) > 2 and line[1][0:4] == 'CHAR':
|
if len(line) > 2 and line[1][0:4] == 'CHAR' and line[2] == "ANSEL":
|
||||||
if line[2] in ('UTF-8', 'ANSI', 'ASCII'):
|
|
||||||
code_set = line[2]
|
|
||||||
elif line[2] == 'ANSEL':
|
|
||||||
ansel = True
|
ansel = True
|
||||||
if len(line) > 2 and line[1][0:4] == 'SOUR' and line[2] == "GRAMPS":
|
if len(line) > 2 and line[1][0:4] == 'SOUR' and line[2] == "GRAMPS":
|
||||||
gramps = True
|
gramps = True
|
||||||
@ -97,6 +93,8 @@ def importData(database, filename, callback=None):
|
|||||||
enc = ['ANSEL', 'ANSEL', 'ANSI', 'ASCII', 'UTF-8']
|
enc = ['ANSEL', 'ANSEL', 'ANSI', 'ASCII', 'UTF-8']
|
||||||
code_set = enc[ code.get_active()]
|
code_set = enc[ code.get_active()]
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
|
else:
|
||||||
|
code_set = ""
|
||||||
|
|
||||||
assert(isinstance(code_set, basestring))
|
assert(isinstance(code_set, basestring))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user