[ Avaa Bypassed ]




Upload:

Command:

www-data@18.224.33.135: ~ $
"""
Exception Classes for the xdg package
"""

debug = False

class Error(Exception):
    """Base class for exceptions defined here."""
    def __init__(self, msg):
        self.msg = msg
        Exception.__init__(self, msg)
    def __str__(self):
        return self.msg

class ValidationError(Error):
    """Raised when a file fails to validate.
    
    The filename is the .file attribute.
    """
    def __init__(self, msg, file):
        self.msg = msg
        self.file = file
        Error.__init__(self, "ValidationError in file '%s': %s " % (file, msg))

class ParsingError(Error):
    """Raised when a file cannot be parsed.
    
    The filename is the .file attribute.
    """
    def __init__(self, msg, file):
        self.msg = msg
        self.file = file
        Error.__init__(self, "ParsingError in file '%s', %s" % (file, msg))

class NoKeyError(Error):
    """Raised when trying to access a nonexistant key in an INI-style file.
    
    Attributes are .key, .group and .file.
    """
    def __init__(self, key, group, file):
        Error.__init__(self, "No key '%s' in group %s of file %s" % (key, group, file))
        self.key = key
        self.group = group
        self.file = file

class DuplicateKeyError(Error):
    """Raised when the same key occurs twice in an INI-style file.
    
    Attributes are .key, .group and .file.
    """
    def __init__(self, key, group, file):
        Error.__init__(self, "Duplicate key '%s' in group %s of file %s" % (key, group, file))
        self.key = key
        self.group = group
        self.file = file

class NoGroupError(Error):
    """Raised when trying to access a nonexistant group in an INI-style file.
    
    Attributes are .group and .file.
    """
    def __init__(self, group, file):
        Error.__init__(self, "No group: %s in file %s" % (group, file))
        self.group = group
        self.file = file

class DuplicateGroupError(Error):
    """Raised when the same key occurs twice in an INI-style file.
    
    Attributes are .group and .file.
    """
    def __init__(self, group, file):
        Error.__init__(self, "Duplicate group: %s in file %s" % (group, file))
        self.group = group
        self.file = file

class NoThemeError(Error):
    """Raised when trying to access a nonexistant icon theme.
    
    The name of the theme is the .theme attribute.
    """
    def __init__(self, theme):
        Error.__init__(self, "No such icon-theme: %s" % theme)
        self.theme = theme

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
BaseDirectory.py File 5.62 KB 0644
Config.py File 728 B 0644
DesktopEntry.py File 17.05 KB 0644
Exceptions.py File 2.44 KB 0644
IconTheme.py File 15.71 KB 0644
IniFile.py File 13.23 KB 0644
Locale.py File 2.11 KB 0644
Menu.py File 38.36 KB 0644
MenuEditor.py File 18.48 KB 0644
Mime.py File 25.56 KB 0644
RecentFiles.py File 5.98 KB 0644
__init__.py File 171 B 0644
util.py File 2.71 KB 0644