From: thefourtheye Date: Tue, 5 May 2015 17:23:56 +0000 (+0530) Subject: install: fix NameError X-Git-Tag: v2.0.1~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b97b96d05a05429f5eccf1588f183a925fbececa;p=platform%2Fupstream%2Fnodejs.git install: fix NameError If `len(args)` is less 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. PR-URL: https://github.com/iojs/io.js/pull/1628 Reviewed-By: Ben Noordhuis Reviewed-By: Jeremiah Senkpiel --- diff --git a/tools/install.py b/tools/install.py index a14e894..8d76a14 100755 --- a/tools/install.py +++ b/tools/install.py @@ -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]