• C
    Removes bare-exception from handle_exception · cc957b38
    Caio Carrara 提交于
    This change updates the handle_exception function so it doesn't need to
    use a bare-except anymore. The code except responsible for get the crash
    directory was kept in a separeted function. This specific code snippet
    can't raise any exception. Internally it uses the
    avocado.utils.path.usable_rw_dir that already deals with possible
    exceptions.
    
    Another possible point of exception could be the import of
    avocado.core.data_dir module before avocado be installed itself. However
    this import was moved to the initial block of import and dealed proper
    as ImportError.
    
    This way seems all the code insisde try block keep being processed by
    try-except blocks without bare-except like before.
    Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
    cc957b38
avocado 2.6 KB