forked from ungleich-public/cdist
cdist runs with path module loaded (unusued though)
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
26fad6f23c
commit
79173488ff
2 changed files with 38 additions and 6 deletions
13
bin/cdist
13
bin/cdist
|
|
@ -32,11 +32,6 @@ import stat
|
|||
import sys
|
||||
import tempfile
|
||||
|
||||
# Add our own library path
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
|
||||
'../lib')))
|
||||
|
||||
import cdist.path
|
||||
|
||||
BANNER = """
|
||||
.. . .x+=:. s
|
||||
|
|
@ -788,11 +783,19 @@ def commandline():
|
|||
|
||||
args.func(args)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
if re.match(TYPE_PREFIX, os.path.basename(sys.argv[0])):
|
||||
emulator()
|
||||
else:
|
||||
# Add our own library path
|
||||
sys.path.insert(0,
|
||||
os.path.abspath(os.path.join(os.path.dirname(__file__),
|
||||
'../lib')))
|
||||
|
||||
import cdist.path
|
||||
|
||||
commandline()
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue