Prep work for inserting directly from HHC
This commit is contained in:
		
							parent
							
								
									152f16c7a0
								
							
						
					
					
						commit
						61b0b8f4fe
					
				| 
						 | 
					@ -83,6 +83,8 @@ class Importer:
 | 
				
			||||||
        self.fdb.do_connect(self.config)
 | 
					        self.fdb.do_connect(self.config)
 | 
				
			||||||
        self.fdb.db.rollback()
 | 
					        self.fdb.db.rollback()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        self.NEWIMPORT = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #Set functions
 | 
					    #Set functions
 | 
				
			||||||
    def setCallHud(self, value):
 | 
					    def setCallHud(self, value):
 | 
				
			||||||
        self.callHud = value
 | 
					        self.callHud = value
 | 
				
			||||||
| 
						 | 
					@ -311,8 +313,16 @@ class Importer:
 | 
				
			||||||
        obj = getattr(mod, filter_name, None)
 | 
					        obj = getattr(mod, filter_name, None)
 | 
				
			||||||
        if callable(obj):
 | 
					        if callable(obj):
 | 
				
			||||||
            conv = obj(in_path = file, out_path = out_path)
 | 
					            conv = obj(in_path = file, out_path = out_path)
 | 
				
			||||||
            if(conv.getStatus()):
 | 
					            if(conv.getStatus() and self.NEWIMPORT == False):
 | 
				
			||||||
                (stored, duplicates, partial, errors, ttime) = self.import_fpdb_file(out_path, site)
 | 
					                (stored, duplicates, partial, errors, ttime) = self.import_fpdb_file(out_path, site)
 | 
				
			||||||
 | 
					            elif (conv.getStatus() and self.NEWIMPORT == True):
 | 
				
			||||||
 | 
					                #This code doesn't do anything yet
 | 
				
			||||||
 | 
					                handlist = hhc.getProcessedHands()
 | 
				
			||||||
 | 
					                self.pos_in_file[file] = hhc.getLastCharacterRead()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                for hand in handlist:
 | 
				
			||||||
 | 
					                    hand.prepInsert()
 | 
				
			||||||
 | 
					                    hand.insert()
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                # conversion didn't work
 | 
					                # conversion didn't work
 | 
				
			||||||
                # TODO: appropriate response?
 | 
					                # TODO: appropriate response?
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user