clenaup logging in emulator, cleanup emulator in main script
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
parent
760b7e7afb
commit
93f5ace932
2 changed files with 4 additions and 23 deletions
|
|
@ -122,12 +122,6 @@ def commandline():
|
|||
|
||||
args.func(args)
|
||||
|
||||
def emulator():
|
||||
"""Prepare and run emulator"""
|
||||
import cdist.emulator
|
||||
emulator = cdist.emulator.Emulator(sys.argv)
|
||||
return emulator.run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Sys is needed for sys.exit()
|
||||
import sys
|
||||
|
|
@ -153,7 +147,9 @@ if __name__ == "__main__":
|
|||
log = logging.getLogger("cdist")
|
||||
|
||||
if re.match("__", os.path.basename(sys.argv[0])):
|
||||
emulator()
|
||||
import cdist.emulator
|
||||
emulator = cdist.emulator.Emulator(sys.argv)
|
||||
emulator.run()
|
||||
else:
|
||||
commandline()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue