rename emulator to run

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-09-27 14:01:09 +02:00
parent 7ec9fbbf12
commit 9d582ae24f
2 changed files with 4 additions and 4 deletions

View file

@ -101,7 +101,7 @@ if __name__ == "__main__":
if re.match(TYPE_PREFIX, os.path.basename(sys.argv[0])):
import cdist.emulator
cdist.emulator.emulator(sys.argv)
cdist.emulator.run(sys.argv)
else:
import cdist
import cdist.banner

View file

@ -29,7 +29,7 @@ import cdist.path
log = logging.getLogger(__name__)
def emulator(argv):
def run(argv):
"""Emulate type commands (i.e. __file and co)"""
type = os.path.basename(argv[0])
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
if object_exists:
if not os.path.isfile(file):
print("New parameter + " + param + "specified, aborting")
print("Source = " + old_object_source + "new =" + object_source)
print("New parameter + \"" + param + "\" specified, aborting")
print("Source = " + " ".join(old_object_source) + " new =" + object_source)
sys.exit(1)
else:
param_fd = open(file, "r")