Merge branch 'master' into celestia-wayland
This commit is contained in:
		
						commit
						fd369552d0
					
				
					 2 changed files with 8 additions and 4 deletions
				
			
		| 
						 | 
					@ -28,20 +28,22 @@
 | 
				
			||||||
from libqtile import hook
 | 
					from libqtile import hook
 | 
				
			||||||
from libqtile.log_utils import logger
 | 
					from libqtile.log_utils import logger
 | 
				
			||||||
from kuro.utils import load_config_class
 | 
					from kuro.utils import load_config_class
 | 
				
			||||||
 | 
					import traceback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
try:
 | 
					try:
 | 
				
			||||||
    from kuro.theme import Kuro
 | 
					    from kuro.theme import Kuro
 | 
				
			||||||
    Theme = Kuro()
 | 
					    Theme = Kuro()
 | 
				
			||||||
except ImportError as e:
 | 
					except ImportError as e:
 | 
				
			||||||
 | 
					    logger.error(traceback.format_exc())
 | 
				
			||||||
    logger.error("Could not load Kuro Theme. Trying to load BaseTheme. Error: {}".format(e))
 | 
					    logger.error("Could not load Kuro Theme. Trying to load BaseTheme. Error: {}".format(e))
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        from kuro.base import BaseTheme as Kuro
 | 
					        from kuro.base import BaseTheme as Kuro
 | 
				
			||||||
        Theme = Kuro()
 | 
					        Theme = Kuro()
 | 
				
			||||||
    except ImportError as e:
 | 
					    except ImportError as e:
 | 
				
			||||||
        Kuro = None
 | 
					        Kuro = None
 | 
				
			||||||
 | 
					        logger.error(traceback.format_exc())
 | 
				
			||||||
        raise ImportError("Could not load theme Config or BaseTheme! Error: {}".format(e))
 | 
					        raise ImportError("Could not load theme Config or BaseTheme! Error: {}".format(e))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
# Import theme configuration
 | 
					# Import theme configuration
 | 
				
			||||||
Config = load_config_class()
 | 
					Config = load_config_class()
 | 
				
			||||||
if Config is None:
 | 
					if Config is None:
 | 
				
			||||||
| 
						 | 
					@ -106,6 +108,7 @@ try:
 | 
				
			||||||
except Exception as e:
 | 
					except Exception as e:
 | 
				
			||||||
    Theme = None
 | 
					    Theme = None
 | 
				
			||||||
    Config = None
 | 
					    Config = None
 | 
				
			||||||
 | 
					    logger.error(traceback.format_exc())
 | 
				
			||||||
    raise AttributeError("Could not configure theme! Error: {}".format(e))
 | 
					    raise AttributeError("Could not configure theme! Error: {}".format(e))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
import socket
 | 
					 | 
				
			||||||
import importlib
 | 
					import importlib
 | 
				
			||||||
 | 
					import socket
 | 
				
			||||||
 | 
					import traceback
 | 
				
			||||||
from libqtile.log_utils import logger
 | 
					from libqtile.log_utils import logger
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def load_config_class():
 | 
					def load_config_class():
 | 
				
			||||||
| 
						 | 
					@ -18,7 +19,7 @@ def load_config_class():
 | 
				
			||||||
        conf_module = importlib.import_module("kuro.config")
 | 
					        conf_module = importlib.import_module("kuro.config")
 | 
				
			||||||
        return getattr(conf_module, "Config")
 | 
					        return getattr(conf_module, "Config")
 | 
				
			||||||
    except ImportError as e:
 | 
					    except ImportError as e:
 | 
				
			||||||
        pass
 | 
					        logger.error(traceback.format_exc())
 | 
				
			||||||
    logger.error("Could not load Kuro Config. Trying to load BaseConfig. Error: {}".format(e))
 | 
					    logger.error("Could not load Kuro Config. Trying to load BaseConfig. Error: {}".format(e))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # If no config yet, load fallback BaseConfig
 | 
					    # If no config yet, load fallback BaseConfig
 | 
				
			||||||
| 
						 | 
					@ -26,5 +27,5 @@ def load_config_class():
 | 
				
			||||||
        base_module = importlib.import_module("kuro.base")
 | 
					        base_module = importlib.import_module("kuro.base")
 | 
				
			||||||
        return getattr(base_module, "BaseConfig")
 | 
					        return getattr(base_module, "BaseConfig")
 | 
				
			||||||
    except ImportError as e:
 | 
					    except ImportError as e:
 | 
				
			||||||
        pass
 | 
					        logger.error(traceback.format_exc())
 | 
				
			||||||
    return None
 | 
					    return None
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue