def mkdir(self, dir):
        """creates (recursively) a directory

        :param string dir: directory to create
        """
        if not os.path.isdir(dir):
            lgr.debug('Creating directory {0}'.format(dir))
            try:
                os.makedirs(dir)
            except __HOLE__ 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.')
dataset/ETHPy150Open cloudify-cosmo/packman/packman/utils.py/Handler.mkdir