Ugly fix to prevent importing from failing due to undef positions array.
This commit is contained in:
		
							parent
							
								
									4cc3cc2272
								
							
						
					
					
						commit
						29366d3bb6
					
				|  | @ -167,7 +167,12 @@ def mainParser(settings, siteID, category, hand, config, db = None): | ||||||
|     except: |     except: | ||||||
|         print "parse: error during commit: " + str(sys.exc_value) |         print "parse: error during commit: " + str(sys.exc_value) | ||||||
| 
 | 
 | ||||||
| 
 | #    HERE's an ugly kludge to keep from failing when positions is undef | ||||||
|  | #    We'll fix this by getting rid of the legacy importer.  REB | ||||||
|  |     try: | ||||||
|  |         if positions: pass | ||||||
|  |     except: | ||||||
|  |         positions = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | ||||||
|     # save data structures in a HandToWrite instance and then insert into database:  |     # save data structures in a HandToWrite instance and then insert into database:  | ||||||
|     htw = Database.HandToWrite() |     htw = Database.HandToWrite() | ||||||
|     htw.set_all( config, settings, base, category, siteTourneyNo, buyin |     htw.set_all( config, settings, base, category, siteTourneyNo, buyin | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user