Fixed folder couldn't be displayed error in BulkImport
This commit is contained in:
		
							parent
							
								
									25be578e7d
								
							
						
					
					
						commit
						88d67dc429
					
				| 
						 | 
					@ -1,4 +1,5 @@
 | 
				
			||||||
#!/usr/bin/env python
 | 
					#!/usr/bin/env python
 | 
				
			||||||
 | 
					# -*- coding: utf-8 -*-
 | 
				
			||||||
"""Configuration.py
 | 
					"""Configuration.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Handles HUD configuration files.
 | 
					Handles HUD configuration files.
 | 
				
			||||||
| 
						 | 
					@ -542,6 +543,13 @@ class Config:
 | 
				
			||||||
            if db_server != None: self.supported_databases[db_name].dp_server = db_server
 | 
					            if db_server != None: self.supported_databases[db_name].dp_server = db_server
 | 
				
			||||||
            if db_type   != None: self.supported_databases[db_name].dp_type   = db_type
 | 
					            if db_type   != None: self.supported_databases[db_name].dp_type   = db_type
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    def getDefaultSite(self):
 | 
				
			||||||
 | 
					        "Returns first enabled site or None"
 | 
				
			||||||
 | 
					        for site_name,site in self.supported_sites.iteritems():
 | 
				
			||||||
 | 
					            if site.enabled:
 | 
				
			||||||
 | 
					                return site_name
 | 
				
			||||||
 | 
					        return None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_tv_parameters(self):
 | 
					    def get_tv_parameters(self):
 | 
				
			||||||
        tv = {}
 | 
					        tv = {}
 | 
				
			||||||
| 
						 | 
					@ -573,14 +581,15 @@ class Config:
 | 
				
			||||||
        except:  imp['fastStoreHudCache'] = True
 | 
					        except:  imp['fastStoreHudCache'] = True
 | 
				
			||||||
        return imp
 | 
					        return imp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_default_paths(self, site = "PokerStars"):
 | 
					    def get_default_paths(self, site = None):
 | 
				
			||||||
 | 
					        if site is None: site = self.getDefaultSite()
 | 
				
			||||||
        paths = {}
 | 
					        paths = {}
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            paths['hud-defaultPath']        = os.path.expanduser(self.supported_sites[site].HH_path)
 | 
					            path = os.path.expanduser(self.supported_sites[site].HH_path)
 | 
				
			||||||
            paths['bulkImport-defaultPath'] = os.path.expanduser(self.supported_sites[site].HH_path)
 | 
					            assert(os.path.isdir(path) or os.path.isfile(path)) # maybe it should try another site?
 | 
				
			||||||
 | 
					            paths['hud-defaultPath'] = paths['bulkImport-defaultPath'] = path
 | 
				
			||||||
        except:
 | 
					        except:
 | 
				
			||||||
            paths['hud-defaultPath']        = "default"
 | 
					            paths['hud-defaultPath'] = paths['bulkImport-defaultPath'] = "default"
 | 
				
			||||||
            paths['bulkImport-defaultPath'] = "default"
 | 
					 | 
				
			||||||
        return paths
 | 
					        return paths
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    def get_frames(self, site = "PokerStars"):
 | 
					    def get_frames(self, site = "PokerStars"):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user