From 4f64464df3f58c2814759c8143d1c05ab0bdbd15 Mon Sep 17 00:00:00 2001 From: Worros Date: Sat, 8 Nov 2008 23:45:14 +1000 Subject: [PATCH] Fix accessor method to import params in Coonfig. Make cli print using accessor --- pyfpdb/Configuration.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index b84dd934..0c88e2fd 100755 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -439,11 +439,13 @@ class Config: def get_import_parameters(self): imp = {} try: - imp['imp-callFpdbHud'] = self.imp.callFpdbHud - imp['hud-defaultInterval'] = int(self.imp.interval) - except: # Default import parameters - imp['imp-callFpdbHud'] = True - imp['hud-defaultInterval'] = 10 + imp['callFpdbHud'] = self.callFpdbHud + imp['interval'] = self.interval + imp['hhArchiveBase'] = self.hhArchiveBase + except: # Default params + imp['callFpdbHud'] = 10 + imp['interval'] = True + imp['hhArchiveBase'] = "~/.fpdb/HandHistories/" return imp def get_default_paths(self, site = "PokerStars"): @@ -562,7 +564,9 @@ if __name__== "__main__": print "----------- END MUCKED WINDOW FORMATS -----------" print "\n----------- IMPORT -----------" -# print c.imp + tmp = c.get_import_parameters() + for param in tmp: + print " " + str(param) + ": " + str(tmp[param]) print "----------- END IMPORT -----------" print "\n----------- TABLE VIEW -----------"