server/serverctl.py
branchstable
changeset 3904 dc7d315165fc
parent 3893 74f216b69628
child 3954 56a8b14d68aa
--- a/server/serverctl.py	Mon Nov 23 18:13:20 2009 +0100
+++ b/server/serverctl.py	Mon Nov 23 19:01:17 2009 +0100
@@ -14,11 +14,13 @@
 from logilab.common.clcommands import register_commands, cmd_run, pop_arg
 from logilab.common.shellutils import ASK
 
-from cubicweb import AuthenticationError, ExecutionError, ConfigurationError, underline_title
+from cubicweb import (AuthenticationError, ExecutionError, ConfigurationError,
+                      underline_title)
 from cubicweb.toolsutils import Command, CommandHandler
 from cubicweb.server import SOURCE_TYPES
 from cubicweb.server.utils import ask_source_config
-from cubicweb.server.serverconfig import USER_OPTIONS, ServerConfiguration
+from cubicweb.server.serverconfig import (USER_OPTIONS, ServerConfiguration,
+                                          SourceConfiguration)
 
 # utility functions ###########################################################
 
@@ -113,6 +115,7 @@
             config._cubes = None
         login, pwd = manager_userpasswd()
 
+
 # repository specific command handlers ########################################
 
 class RepositoryCreateHandler(CommandHandler):
@@ -135,8 +138,8 @@
         sourcesfile = config.sources_file()
         # XXX hack to make Method('default_instance_id') usable in db option
         # defs (in native.py)
-        Configuration.default_instance_id = staticmethod(lambda: config.appid)
-        sconfig = Configuration(options=SOURCE_TYPES['native'].options)
+        sconfig = SourceConfiguration(config.appid,
+                                      options=SOURCE_TYPES['native'].options)
         sconfig.adapter = 'native'
         sconfig.input_config(inputlevel=inputlevel)
         sourcescfg = {'system': sconfig}