Skip to content

Commit 5f92963

Browse files
committed
manually merged PR82 with minor adjustments in line with review comments and added missing docstrings on new generate helper functions.
git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@6092 b75ad72c-e7d7-11dd-a971-7dbc132099af
1 parent 891b499 commit 5f92963

File tree

3 files changed

+347
-45
lines changed

3 files changed

+347
-45
lines changed

mig/install/generateconfs.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
# Solve this by ensuring that the chckout is part of the sys.path
4242

4343
# NOTE: __file__ is /MIG_BASE/mig/install/generateconfs.py and we need MIG_BASE
44-
45-
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
44+
dirname = os.path.dirname
45+
sys.path.append(dirname(dirname(dirname(os.path.abspath(__file__)))))
4646

4747
# NOTE: moved mig imports into try/except to avoid autopep8 moving to top!
4848
try:
@@ -358,9 +358,10 @@ def usage(options):
358358
# Remove default values to use generate_confs default values
359359
if val == 'DEFAULT':
360360
del settings[key]
361-
conf = generate_confs(**settings)
361+
options = generate_confs(**settings)
362362
# TODO: avoid reconstructing this path (also done inside generate_confs)
363-
instructions_path = "%s/instructions.txt" % conf['destination_path']
363+
instructions_path = os.path.join(options['destination_dir'],
364+
'instructions.txt')
364365
try:
365366
instructions_fd = open(instructions_path, "r")
366367
instructions = instructions_fd.read()

0 commit comments

Comments
 (0)