Skip to content

Commit

Permalink
install: Fixing NameError
Browse files Browse the repository at this point in the history
If `len(args)` is lesser than two, then
`install_path = dst_dir + node_prefix + '/'` would throw a `NameError`,
because `dst_dir` will not be defined yet. So we are assigning `''` as
the default value.
  • Loading branch information
thefourtheye committed May 5, 2015
1 parent b712af7 commit 850610c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ def run(args):
# argv[2] is a custom install prefix for packagers (think DESTDIR)
# argv[3] is a custom install prefix (think PREFIX)
# Difference is that dst_dir won't be included in shebang lines etc.
if len(args) > 2:
dst_dir = args[2]
dst_dir = args[2] if len(args) > 2 else ''

if len(args) > 3:
node_prefix = args[3]

Expand Down

0 comments on commit 850610c

Please sign in to comment.