mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 14:17:46 +00:00
Fix AttributeError on "local exec"
`local exec` was failing with the following stacktrace: Traceback (most recent call last): File "/home/regis/venvs/tutor/bin/tutor", line 11, in <module> load_entry_point('tutor-openedx', 'console_scripts', 'tutor')() File "/home/regis/projets/overhang/repos/overhang/tutor/tutor/commands/cli.py", line 38, in main cli() # pylint: disable=no-value-for-parameter File "/home/regis/venvs/tutor/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/regis/venvs/tutor/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/regis/venvs/tutor/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/regis/venvs/tutor/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/regis/venvs/tutor/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/regis/venvs/tutor/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/home/regis/projets/overhang/repos/overhang/tutor/tutor/commands/compose.py", line 237, in ex ecute dc_command.callback("exec", args) File "/home/regis/venvs/tutor/lib/python3.8/site-packages/click/decorators.py", line 33, in new_func return f(get_current_context().obj, *args, **kwargs) File "/home/regis/projets/overhang/repos/overhang/tutor/tutor/commands/compose.py", line 271, in dc_command volumes, non_volume_args = bindmounts.parse_volumes(args) File "/home/regis/projets/overhang/repos/overhang/tutor/tutor/bindmounts.py", line 73, in parse_vol umes context = custom_docker_compose.make_context("custom", args) File "/home/regis/venvs/tutor/lib/python3.8/site-packages/click/core.py", line 700, in make_context self.parse_args(ctx, args) File "/home/regis/venvs/tutor/lib/python3.8/site-packages/click/core.py", line 1045, in parse_args opts, args, param_order = parser.parse_args(args=args) File "/home/regis/venvs/tutor/lib/python3.8/site-packages/click/parser.py", line 269, in parse_args self._process_args_for_options(state) File "/home/regis/venvs/tutor/lib/python3.8/site-packages/click/parser.py", line 289, in _process_a rgs_for_options arg = state.rargs.pop(0) AttributeError: 'tuple' object has no attribute 'pop'
This commit is contained in:
parent
75080cc7db
commit
df3d432518
@ -2,6 +2,10 @@
|
||||
|
||||
Note: Breaking changes between versions are indicated by "💥".
|
||||
|
||||
## Unreleased
|
||||
|
||||
- [Bugfix] Fix `local exec` command which crashed with a `AttributeError`.
|
||||
|
||||
## v11.1.0 (2021-01-13)
|
||||
|
||||
- [Bugfix] Fix "Read-only file system" errors when running `tutor dev runserver` commands on Mac OS. (again, see #392)
|
||||
|
@ -59,7 +59,7 @@ def get_root_path(root):
|
||||
return os.path.join(root, "volumes")
|
||||
|
||||
|
||||
def parse_volumes(args):
|
||||
def parse_volumes(docker_compose_args):
|
||||
"""
|
||||
Parse `-v/--volume` options from an arbitrary list of arguments.
|
||||
"""
|
||||
@ -70,5 +70,7 @@ def parse_volumes(args):
|
||||
def custom_docker_compose(volumes, args): # pylint: disable=unused-argument
|
||||
pass
|
||||
|
||||
context = custom_docker_compose.make_context("custom", args)
|
||||
if isinstance(docker_compose_args, tuple):
|
||||
docker_compose_args = list(docker_compose_args)
|
||||
context = custom_docker_compose.make_context("custom", docker_compose_args)
|
||||
return context.params["volumes"], context.params["args"]
|
||||
|
Loading…
Reference in New Issue
Block a user