Skip to content

Commit

Permalink
Allow DTZ and WDL in seperate directories
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Mar 18, 2015
1 parent 5fffad2 commit 327ddd6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions chess/syzygy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1282,17 +1282,20 @@ def open_directory(self, directory, load_dtz=True):
self.wdl[wdl_table.mirrored_key] = wdl_table

num += 1
except IOError:
pass

if load_dtz:
if load_dtz:
try:
dtz_table = DtzTable(directory, filename)
if dtz_table.key in self.dtz:
self.dtz[dtz_table.key].close()
self.dtz[dtz_table.key] = dtz_table
self.dtz[dtz_table.mirrored_key] = dtz_table

num += 1
except IOError:
pass
except IOError:
pass

return num

Expand Down

0 comments on commit 327ddd6

Please sign in to comment.