Commit Graph

238 Commits

Author SHA1 Message Date
Worros
53c796dddc Importer: Add excetion handler to hud call.
Had a report on the 2+2 thread that:

  File "C:\Documents and Settings\b\Desktop\fpdb\pyfpdb\GuiAutoImport.py", line 160, in do_import
    self.importer.runUpdated()
  File "C:\Documents and Settings\b\Desktop\fpdb\pyfpdb\fpdb_import.py", line 371, in runUpdated
    (stored, duplicates, partial, errors, ttime) = self.import_file_dict(self.database, file, self.filelist[file][0], self.filelist[file][1], None)
  File "C:\Documents and Settings\b\Desktop\fpdb\pyfpdb\fpdb_import.py", line 467, in import_file_dict
    print "fpdb_import: sending hand to hud", hand.dbid_hands, "pipe =", self.caller.pipe_to_hud
IOError: [Errno 9] Bad file descriptor

Was happening, which is a crash attempting to print self.caller.pipe_to_hud

This patch doesn't fix the problem, but should give some indication in the log that it happened.
2010-08-03 19:27:34 +08:00
sqlcoder
397e87b800 autoimport passes filenames to fpdb_import as unicode, so make bulk import do this as well so that add_import_file() always gets same type 2010-07-13 23:12:50 +01:00
steffen123
1d571cabee windows: by sqlcoder, fixes importing files with greek characters 2010-07-12 18:04:30 +02:00
steffen123
178b528d3b change calls to python2 back to python 2010-07-08 20:01:03 +02:00
steffen123
3b24fd18b2 some cleanups:
- updated copyright notices
- added copyright notices that were missing
- changed python to python2
- added gpl-2/3 license texts
- removed THANKS.txt file as the wiki version is more up to date
- removed empty fpdb_db.py
- added GPL2 to debian license file
2010-07-04 03:05:16 +02:00
steffen123
e8864bf241 change email address for bug reports from my personal one to mailing list 2010-07-02 23:48:01 +02:00
Worros
6ba7621f2a Fix 'errors' stat in importer
Instead of:
GuiBulkImport done: Stored: 32  Duplicates: 0   Partial: 0  Errors: 32 in 0.530081987381 seconds - 0/sec

We have:
GuiBulkImport done: Stored: 0   Duplicates: 0   Partial: 0  Errors: 32 in 0.530081987381 seconds - 0/sec
2010-04-23 00:28:30 +08:00
sqlcoder
141b88ecfd stop hudcache updating again when importing duplicate hands 2010-02-20 17:49:03 +00:00
sqlcoder
864454f31c change 2 commits to 1, may help sqlite stop locking up 2010-02-03 01:03:36 +00:00
sqlcoder
d4248706e4 remove surplus get_logger calls, tidy up log messages some more 2010-02-01 22:31:00 +00:00
sqlcoder
86330e536a tidy up logging so that log isn't created in /fpdb/log/ unless it is being used 2010-02-01 21:03:51 +00:00
sqlcoder
f7b402bcdb remove execute from permissions on some files in last commit 2010-01-31 11:27:37 +00:00
sqlcoder
5e9486aa3d config changes for logging: logs rotate and go to APPDATA, hud_config now goes in /fpdb/ if they must use it but logging.conf stays in /pyfpdb/. TODO: Some logging still into /fpdb/log/ 2010-01-31 11:25:24 +00:00
Eric Blade
3381527afc raise FpdbHandDuplicate error on duplicate insert attempt, catch it in import_file_dict, increment duplicates count 2010-01-28 05:56:17 -05:00
Eric Blade
997483f909 make import timer work again 2010-01-28 05:19:19 -05:00
sqlcoder
11bc48e126 merge fpdb_db.py into Database.py 2010-01-26 23:54:04 +00:00
Worros
896de37d0d Fix hudCache update semantics 2010-01-26 01:00:22 +08:00
Worros
29e705f337 Remove NEWIMPORT variable.
No going back now :)
2010-01-23 13:37:41 +08:00
Worros
0adf0a7b18 [NEWIMPORT] updateHudCache update.
Fix a couple of bugs:
    position != 2 its = 'M'
    actually commit changes to hud
2009-12-24 01:12:39 +08:00
Worros
a0475aa4db [NEWIMPORT] Add function to update hudcache for Hand 2009-12-23 23:14:34 +08:00
Worros
d8a87b92d4 [NEWIMPORT] Make hudcache rebuild only happen no call to hud 2009-12-22 22:15:27 +08:00
Worros
284693e95e [NEWIMPORT] Rebuild hudcache after hand is committed 2009-12-22 22:02:36 +08:00
Worros
4d8d678d64 [NEWIMPORT] Make seek into autoimport function
Now that the legacy import path is gone, enable the index for HHC
2009-12-22 21:40:37 +08:00
Worros
1b82f20411 [NEWIMPORT] Remove legacy code. 2009-12-22 14:44:35 +08:00
Worros
02453ce3c0 Move locale variable to Configuration 2009-12-22 13:47:33 +08:00
Worros
1093b1e43c Remove dead code 2009-12-18 10:27:09 +08:00
Worros
26fc0b5928 Add ability to import Stars archive files.
PokerStars support can provide a HH archive. The format is similar but not the same as a a standard hh format as it contains an additional line "Hand #X" between each hand.

Patch adds an option -s to GuiBulkImport, which when specified will strip these lines out and continue parsing.
2009-12-17 18:42:50 +08:00
Worros
f7616c6ee8 [NEWIMPORT] Move hud call to after database commit
HUD still doesn't quite work, but getting closer - suspect hud_cache rebuild isn't happening
2009-12-17 02:24:57 +08:00
Worros
80c324c8e1 [NEWIMPORT] Add a commit at the end of the fpdb_import cycle 2009-12-17 00:40:36 +08:00
Worros
be0cb6fc2a Fix a couple of typos 2009-12-15 22:56:18 +08:00
Carl Gherardi
40cbb55f7f [NEWIMPORT] Enable printInsert, disable hud pipe 2009-12-13 13:47:14 +08:00
Worros
5f67fc8220 Merge branch 'master' of git://git.assembla.com/fpdb-eric 2009-12-07 12:10:56 +08:00
Worros
0061bd0644 [NEWIMPORT] Add call to HUD for auto import
Make sure the matching db_handid is recorded in the Hand object for later use
2009-12-06 23:02:07 +08:00
Worros
ee205c3b29 [NEWIMPORT] Partially fix number of hands parsed reporting 2009-12-04 17:56:56 +08:00
Eric Blade
9953e76c9e trap IOError on hud pipe write when hud closed without autoimport stopping, turn off hud 2009-11-30 09:51:47 -05:00
Eric Blade
8c8fdba7c8 ttime = float with us to ms resolution 2009-11-30 09:08:30 -05:00
Eric Blade
284b0c1f38 fix return tuple in import_file_dict, fix text from autoimport to actually show up in autoimport window 2009-11-30 08:14:03 -05:00
Worros
36dda2174b Move NEWIMPORT into config
Fix test_PokerStars test to catch exception when importing with the legacy importer
2009-11-30 14:33:32 +08:00
Eric Blade
67beb4bd9f add textview to autoimport window for dropping status/info messages on, just call it's AddText func to get it there 2009-11-29 23:52:36 -05:00
Eric Blade
0b4f5acec1 some weird whitespace churning, and again comment out "sending hand to hud" message 2009-11-25 08:22:14 -05:00
Eratosthenes
5021cae297 Clean up logging changes. 2009-11-09 19:30:23 -05:00
unknown
ab1c37ead2 IndexError -> KeyError .. doh. 2009-11-04 10:46:36 -05:00
unknown
51da6fb687 cleaner 2009-11-03 15:29:05 -05:00
unknown
a6b7292943 mostly None checkings fixed (== to is != to is not) 2009-11-03 14:30:52 -05:00
Mika Bostrom
b8f19741e0 Fix packaging issues
Affected files:
* Configuration.py
* Database.py
* HandHistoryConverter.py
* fpdb_import.py

and setup.py to a lesser extent.

Logging requires a configuration file when initialising the class. If we
are executing from outside the source tree, this file is not present.
Catch config parser's error and try to provide the logging config file
from debian package path.

Update symlink target to match python-support from latest Debian and the
oncoming Ubuntu versions.
2009-10-21 20:24:46 +03:00
sqlcoder
518fd9e039 merge from Eric 2009-09-26 11:45:05 +01:00
sqlcoder
ea74862a5a start changes to allow different hud choices for hero and opponents 2009-09-26 11:30:12 +01:00
Eric Blade
2790a623af import, code, exception cleanups 2009-09-15 21:07:31 -05:00
Eric Blade
d6c5309aa3 clean up some module import code in fpdb_import 2009-09-15 20:10:18 -05:00
Eric Blade
715b14f81a moved timeout_add that calls do_import outside of the for loop, so it's only created once per autoimport start, not once per site. fix addImportFile to ignore files that don't exist (not sure how they'd get there, but just in case), fixed exception looking for fpdb_simple.DuplicateError to look in it's actual location at Exceptions.DuplicateError 2009-09-11 00:12:46 -05:00