def mkdir(self, dir):
        if not os.path.isdir(dir):
            lgr.debug('Creating directory {0}'.format(dir))
            try:
                os.makedirs(dir)
            except OSError as ex:
                lgr.error('Failed to create {0} ({1})'.format(dir, str(ex)))
                sys.exit(codes.mapping['failed_to_mkdir'])
        else:
            lgr.debug('Directory already exists, skipping.')
creates (recursively) a directory
dataset/ETHPy150Open cloudify-cosmo/packman/packman/utils.py/Handler.mkdir