# HG changeset patch # User Denis Laxalde # Date 1490008384 -3600 # Node ID b8c4a8bab7b3d0503b05581f5babddb02118a320 # Parent 4870e5a60a525fa38b91d62315bf2686e54e49c8 [devtools] Create "newcube" in current directory by default Instead of using "cubes path", which in many cases will be something wrong (like /share/cubicweb/cubes) now that cubes are regular Python packages. diff -r 4870e5a60a52 -r b8c4a8bab7b3 cubicweb/devtools/devctl.py --- a/cubicweb/devtools/devctl.py Mon Mar 20 14:39:22 2017 +0100 +++ b/cubicweb/devtools/devctl.py Mon Mar 20 12:13:04 2017 +0100 @@ -28,7 +28,7 @@ import tempfile import sys from datetime import datetime, date -from os import mkdir, chdir, path as osp +from os import getcwd, mkdir, chdir, path as osp import pkg_resources from warnings import warn @@ -691,13 +691,8 @@ verbose = self.get('verbose') destdir = self.get('directory') if not destdir: - cubespath = ServerConfiguration.cubes_search_path() - if len(cubespath) > 1: - raise BadCommandUsage( - "can't guess directory where to put the new cube." - " Please specify it using the --directory option") - destdir = cubespath[0] - if not osp.isdir(destdir): + destdir = getcwd() + elif not osp.isdir(destdir): print("-> creating cubes directory", destdir) try: mkdir(destdir)