Hashset Loading update
This commit is contained in:
parent
c42b4e8f5c
commit
f8dfcf799c
|
@ -7,7 +7,8 @@ import os
|
|||
|
||||
def read_hashset_file(filename):
|
||||
with open(filename, 'r') as hashfile:
|
||||
ltest = list(hashfile.readlines())
|
||||
# TODO: Test for regression
|
||||
ltest = list(hashfile.read().splitlines())
|
||||
return ltest
|
||||
|
||||
|
||||
|
@ -17,7 +18,6 @@ def load_hashsets(path, status_callback=None):
|
|||
filename = os.path.join(path, content)
|
||||
if os.path.isfile(filename):
|
||||
hashset = os.path.basename(filename).split('.')[0]
|
||||
print('Reading Hashset "{}"...'.format(hashset))
|
||||
if status_callback:
|
||||
status_callback('Reading Hashset "{}"...'.format(hashset))
|
||||
hashes = read_hashset_file(filename)
|
||||
|
@ -26,4 +26,4 @@ def load_hashsets(path, status_callback=None):
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
hashsets = load_hashsets('Hashsets')
|
||||
hashsets = load_hashsets('Hashsets')
|
||||
|
|
|
@ -103,7 +103,6 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
model.setData(model.index(0, i), value)
|
||||
model.item(0, i).setTextAlignment(field[4])
|
||||
|
||||
|
||||
def loadMetFile(self, filename):
|
||||
for met_entry in load_knownfiles(filename):
|
||||
self.addED2K(self.treeModel, met_entry)
|
||||
|
|
Loading…
Reference in New Issue