deviantony / xtrabackup-scripts

Wrapper scripts (Python) for the Percona Xtrabackup tool.
http://www.percona.com/doc/percona-xtrabackup
110 stars 46 forks source link

Raise an ProgramError instead of an OSError in mkdir_path #20

Closed deviantony closed 9 years ago

deviantony commented 9 years ago

In _filesystemutils, method _mkdirpath.

https://github.com/deviantony/xtrabackup-scripts/blob/develop/xtrabackup%2Ffilesystem_utils.py#L35

Raise a ProgramError instead of an OSError:

    try:
        os.makedirs(path, mode)
    except OSError as exc:
        if exc.errno == errno.EEXIST and os.path.isdir(path):
            pass
        else:
            raise ProgramError("Unable to create directory" + path)