Mercurial > hg > graal-compiler
comparison mx/mx_graal.py @ 21169:41ec6d89cb84
mx: fix calls to is_interactive()
author | Andreas Woess <andreas.woess@oracle.com> |
---|---|
date | Thu, 30 Apr 2015 23:55:22 +0200 |
parents | f383ff4c9af8 |
children | 326a1f374198 b426469fadb7 |
comparison
equal
deleted
inserted
replaced
21168:8407957b067b | 21169:41ec6d89cb84 |
---|---|
116 global _vm | 116 global _vm |
117 if _vm: | 117 if _vm: |
118 return _vm | 118 return _vm |
119 vm = mx.get_env('DEFAULT_VM') | 119 vm = mx.get_env('DEFAULT_VM') |
120 if vm is None: | 120 if vm is None: |
121 if not mx.is_interactive()(): | 121 if not mx.is_interactive(): |
122 mx.abort('Need to specify VM with --vm option or DEFAULT_VM environment variable') | 122 mx.abort('Need to specify VM with --vm option or DEFAULT_VM environment variable') |
123 envPath = join(_graal_home, 'mx', 'env') | 123 envPath = join(_graal_home, 'mx', 'env') |
124 mx.log('Please select the VM to be executed from the following: ') | 124 mx.log('Please select the VM to be executed from the following: ') |
125 items = [k for k in _vmChoices.keys() if _vmChoices[k] is not None] | 125 items = [k for k in _vmChoices.keys() if _vmChoices[k] is not None] |
126 descriptions = [_vmChoices[k] for k in _vmChoices.keys() if _vmChoices[k] is not None] | 126 descriptions = [_vmChoices[k] for k in _vmChoices.keys() if _vmChoices[k] is not None] |
390 | 390 |
391 def _handle_missing_VM(bld, vm=None): | 391 def _handle_missing_VM(bld, vm=None): |
392 if not vm: | 392 if not vm: |
393 vm = _get_vm() | 393 vm = _get_vm() |
394 mx.log('The ' + bld + ' ' + vm + ' VM has not been created') | 394 mx.log('The ' + bld + ' ' + vm + ' VM has not been created') |
395 if mx.is_interactive()(): | 395 if mx.is_interactive(): |
396 if mx.ask_yes_no('Build it now', 'y'): | 396 if mx.ask_yes_no('Build it now', 'y'): |
397 with VM(vm, bld): | 397 with VM(vm, bld): |
398 build([]) | 398 build([]) |
399 return | 399 return |
400 mx.abort('You need to run "mx --vm ' + vm + ' --vmbuild ' + bld + ' build" to build the selected VM') | 400 mx.abort('You need to run "mx --vm ' + vm + ' --vmbuild ' + bld + ' build" to build the selected VM') |