Closed rkhamis closed 5 years ago
That is already the case, unless if the instance that was created first was not saved.
JSX> j.servers.sonic.new(name='testerror') ## sonicserver SonicServer ### properties: - config_path : /sandbox/cfg/sonic_config.cfg - default_client : - startupcmd : ### data: - host : 127.0.0.1 - name : testerror - password : 123456 - port : 1491 - timeout : 300 JSX> _.save() ## .sonic.server id: 19 name : testerror host : 127.0.0.1 port : 1,491 password : 123456 timeout : 300 JSX> j.servers.sonic.new(name='testerror') Sun 14 16:47:54 _sonic_server_1.py - 340 - jumpscale.sonic.server.1:19 : DDICT Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 73, in new raise RuntimeError("obj: %s already exists" % name) RuntimeError: obj: testerror already exists obj: testerror already exists
Indeed, this behavior makes sense
That is already the case, unless if the instance that was created first was not saved.