rename emulator to run
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
7ec9fbbf12
commit
9d582ae24f
2 changed files with 4 additions and 4 deletions
|
@ -101,7 +101,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
if re.match(TYPE_PREFIX, os.path.basename(sys.argv[0])):
|
if re.match(TYPE_PREFIX, os.path.basename(sys.argv[0])):
|
||||||
import cdist.emulator
|
import cdist.emulator
|
||||||
cdist.emulator.emulator(sys.argv)
|
cdist.emulator.run(sys.argv)
|
||||||
else:
|
else:
|
||||||
import cdist
|
import cdist
|
||||||
import cdist.banner
|
import cdist.banner
|
||||||
|
|
|
@ -29,7 +29,7 @@ import cdist.path
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
def emulator(argv):
|
def run(argv):
|
||||||
"""Emulate type commands (i.e. __file and co)"""
|
"""Emulate type commands (i.e. __file and co)"""
|
||||||
type = os.path.basename(argv[0])
|
type = os.path.basename(argv[0])
|
||||||
type_dir = os.path.join(os.environ['__cdist_type_base_dir'], type)
|
type_dir = os.path.join(os.environ['__cdist_type_base_dir'], type)
|
||||||
|
@ -101,8 +101,8 @@ def emulator(argv):
|
||||||
# Already exists, verify all parameter are the same
|
# Already exists, verify all parameter are the same
|
||||||
if object_exists:
|
if object_exists:
|
||||||
if not os.path.isfile(file):
|
if not os.path.isfile(file):
|
||||||
print("New parameter + " + param + "specified, aborting")
|
print("New parameter + \"" + param + "\" specified, aborting")
|
||||||
print("Source = " + old_object_source + "new =" + object_source)
|
print("Source = " + " ".join(old_object_source) + " new =" + object_source)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
param_fd = open(file, "r")
|
param_fd = open(file, "r")
|
||||||
|
|
Loading…
Reference in a new issue