Config: Add ResultsDirectory to <import>
This commit is contained in:
parent
7b43aef4f7
commit
7c4337bd96
|
@ -483,6 +483,7 @@ class Import:
|
||||||
self.interval = node.getAttribute("interval")
|
self.interval = node.getAttribute("interval")
|
||||||
self.callFpdbHud = node.getAttribute("callFpdbHud")
|
self.callFpdbHud = node.getAttribute("callFpdbHud")
|
||||||
self.hhArchiveBase = node.getAttribute("hhArchiveBase")
|
self.hhArchiveBase = node.getAttribute("hhArchiveBase")
|
||||||
|
self.ResultsDirectory = node.getAttribute("ResultsDirectory")
|
||||||
self.hhBulkPath = node.getAttribute("hhBulkPath")
|
self.hhBulkPath = node.getAttribute("hhBulkPath")
|
||||||
self.saveActions = string_to_bool(node.getAttribute("saveActions"), default=False)
|
self.saveActions = string_to_bool(node.getAttribute("saveActions"), default=False)
|
||||||
self.cacheSessions = string_to_bool(node.getAttribute("cacheSessions"), default=False)
|
self.cacheSessions = string_to_bool(node.getAttribute("cacheSessions"), default=False)
|
||||||
|
@ -491,8 +492,8 @@ class Import:
|
||||||
self.saveStarsHH = string_to_bool(node.getAttribute("saveStarsHH"), default=False)
|
self.saveStarsHH = string_to_bool(node.getAttribute("saveStarsHH"), default=False)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return " interval = %s\n callFpdbHud = %s\n hhArchiveBase = %s\n saveActions = %s\n fastStoreHudCache = %s\n" \
|
return " interval = %s\n callFpdbHud = %s\n hhArchiveBase = %s\n saveActions = %s\n fastStoreHudCache = %s\nResultsDirectory = %s" \
|
||||||
% (self.interval, self.callFpdbHud, self.hhArchiveBase, self.saveActions, self.cacheSessions, self.sessionTimeout, self.fastStoreHudCache)
|
% (self.interval, self.callFpdbHud, self.hhArchiveBase, self.saveActions, self.cacheSessions, self.sessionTimeout, self.fastStoreHudCache, self.ResultsDirectory)
|
||||||
|
|
||||||
class HudUI:
|
class HudUI:
|
||||||
def __init__(self, node):
|
def __init__(self, node):
|
||||||
|
@ -1261,6 +1262,14 @@ class Config:
|
||||||
try: imp['hhArchiveBase'] = self.imp.hhArchiveBase
|
try: imp['hhArchiveBase'] = self.imp.hhArchiveBase
|
||||||
except: imp['hhArchiveBase'] = "~/.fpdb/HandHistories/"
|
except: imp['hhArchiveBase'] = "~/.fpdb/HandHistories/"
|
||||||
|
|
||||||
|
# ResultsDirectory is the local cache for downloaded results
|
||||||
|
# NOTE: try: except: doesn'tseem to be triggering
|
||||||
|
# using if instead
|
||||||
|
if self.imp.ResultsDirectory != '':
|
||||||
|
imp['ResultsDirectory'] = self.imp.ResultsDirectory
|
||||||
|
else:
|
||||||
|
imp['ResultsDirectory'] = "~/.fpdb/Results/"
|
||||||
|
|
||||||
# hhBulkPath is the default location for bulk imports (if set)
|
# hhBulkPath is the default location for bulk imports (if set)
|
||||||
try: imp['hhBulkPath'] = self.imp.hhBulkPath
|
try: imp['hhBulkPath'] = self.imp.hhBulkPath
|
||||||
except: imp['hhBulkPath'] = ""
|
except: imp['hhBulkPath'] = ""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user