def ensureDirExists(myDir): """creates a dir subdirectory of plugins/JxPlugin/ if it doesn't exist""" path = os.path.join(os.path.dirname(__file__ ), myDir) if not(os.path.isdir(path)): try: os.mkdir(path) except OSError: showWarning("Couldn't create the '" + myDir + "' directory.")
def ensureDirExists(myDir): """creates a dir subdirectory of plugins/JxPlugin/ if it doesn't exist""" path = os.path.join(mw.config.configPath, "plugins", "JxPlugin", myDir) if not (os.path.isdir(path)): try: os.mkdir(path) except OSError: showWarning("Couldn't create the '" + myDir + "' directory.")
def ensure_dir_exists(dir): """creates a dir subdirectory of plugins/JxPlugin/ if it doesn't exist""" path = os.path.join(mw.config.configPath, "plugins","JxPlugin",dir) if not(os.path.isdir(path)): try: os.mkdir(path) except OSError: # big troubles ahead... raise an error message pass from ankiqt.ui.utils import showWarning showWarning("Couldn't create the '" + dir + "' directory.")