cubicweb/devtools/devctl.py
branch3.25
changeset 12080 b8c4a8bab7b3
parent 11900 8496135b6dc1
child 12508 a8c1ea390400
child 12687 59c3e639f62c
--- 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)