fix comment error in example hud config and call sys.exit() if the error is still there instead of exit()

This commit is contained in:
sqlcoder 2010-06-14 22:52:23 +01:00
parent 9b59957a9b
commit d6f3bed1d4
2 changed files with 11 additions and 5 deletions

View File

@ -2,9 +2,11 @@
<FreePokerToolsConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FreePokerToolsConfig.xsd"> <FreePokerToolsConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FreePokerToolsConfig.xsd">
<general config_wrap_len="-1" <!-- preferred max line length in this file, -1 means no max --> <!-- config_wrap_len is preferred max line length in this file, -1 means no max
day_start="5" <!-- time that logical day starts, e.g. 5 means that any play day_start is time that logical day starts, e.g. 5 means that any play
between 00:00 and 04:59:59 counts as being on the previous day --> between 00:00 and 04:59:59 counts as being on the previous day -->
<general config_wrap_len="-1"
day_start="5"
/> />
<import callFpdbHud = "True" interval = "10" fastStoreHudCache="False" hhArchiveBase="~/.fpdb/HandHistories/" saveActions="True"></import> <import callFpdbHud = "True" interval = "10" fastStoreHudCache="False" hhArchiveBase="~/.fpdb/HandHistories/" saveActions="True"></import>

View File

@ -714,7 +714,7 @@ class fpdb:
self.warning_box( "There is an error in your config file\n" + self.config.file self.warning_box( "There is an error in your config file\n" + self.config.file
+ "\n\nError is: " + str(self.config.file_error) + "\n\nError is: " + str(self.config.file_error)
, diatitle="CONFIG FILE ERROR" ) , diatitle="CONFIG FILE ERROR" )
exit() sys.exit()
log = Configuration.get_logger("logging.conf", "fpdb", log_dir=self.config.dir_log) log = Configuration.get_logger("logging.conf", "fpdb", log_dir=self.config.dir_log)
print "Logfile is " + os.path.join(self.config.dir_log, self.config.log_file) + "\n" print "Logfile is " + os.path.join(self.config.dir_log, self.config.log_file) + "\n"
@ -905,7 +905,11 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
self.window.connect("destroy", self.destroy) self.window.connect("destroy", self.destroy)
self.window.set_title("Free Poker DB - v%s or higher" % (VERSION, )) self.window.set_title("Free Poker DB - v%s or higher" % (VERSION, ))
self.window.set_border_width(1) self.window.set_border_width(1)
self.window.set_default_size(900,720) defx, defy = 900, 720
sx, sy = gtk.gdk.screen_width(), gtk.gdk.screen_height()
if sx < defx: defx = sx
if sy < defy: defy = sy
self.window.set_default_size(defx, defy)
self.window.set_resizable(True) self.window.set_resizable(True)
self.main_vbox = gtk.VBox(False, 1) self.main_vbox = gtk.VBox(False, 1)