From 8130789d395ebb2a4316cd02c7bb1a354077ff04 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Wed, 8 Jul 2015 17:46:50 +0200 Subject: [PATCH] Add click-repl as optdepend --- vdirsyncer/cli/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vdirsyncer/cli/__init__.py b/vdirsyncer/cli/__init__.py index 78027a3..ab195e8 100644 --- a/vdirsyncer/cli/__init__.py +++ b/vdirsyncer/cli/__init__.py @@ -211,3 +211,12 @@ def repair(collection): from .tasks import repair_collection general, all_pairs, all_storages = ctx.obj['config'] repair_collection(general, all_pairs, all_storages, collection) + +try: + import click_repl + click_repl.register_repl(app) +except ImportError: + @app.command() + def repl(): + click.echo('You need click-repl installed.') + ctx.exit(1)