Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing in traitlets via commandline #1123

Merged
merged 2 commits into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion repo2docker/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,10 @@ def make_r2d(argv=None):
print(__version__)
sys.exit(0)

args = get_argparser().parse_args(argv)
args, traitlet_args = get_argparser().parse_known_args(argv)

r2d = Repo2Docker()
r2d.parse_command_line(traitlet_args)

if args.debug:
r2d.log_level = logging.DEBUG
Expand Down
2 changes: 1 addition & 1 deletion repo2docker/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def json_excepthook(self, etype, evalue, traceback):
extra=dict(phase="failed"),
)

def initialize(self):
def initialize(self, *args, **kwargs):
"""Init repo2docker configuration before start"""
# FIXME: Remove this function, move it to setters / traitlet reactors
if self.json_logs:
Expand Down