Commit dabcc1a4 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Handle exceptions when using --filter-by

Handle exceptions in 'filter_results' (management commands helper
functions used to implement --filter-by option).
parent 3d720d3f
......@@ -211,6 +211,8 @@ def filter_results(objects, filter_by):
return objects.exclude(**exclude_dict)
except FieldError as e:
raise CommandError(e)
except Exception as e:
raise CommandError("Can not filter results: %s" % e)
def check_backend_credentials(clustername, port, username, password):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment