Commit 8201a604 authored by Antoine Millet's avatar Antoine Millet
Browse files

Console and shell in cli handler now handle empty queries

parent 559fed79
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -932,7 +932,9 @@ class CliHandler(RegisteredCCHandler):
        :return: the label of the created tunnel
        """
        objects = self.client.list(tql, show=('r', 'p', 'h'), method='console')
        if len(objects) != 1:
        if not objects:
            raise NotImplementedError('No objects matched by query')
        elif len(objects) != 1:
            raise NotImplementedError('Console only support one tunnel at time for now')
        errs = Reporter()
        for obj in objects:
@@ -961,7 +963,9 @@ class CliHandler(RegisteredCCHandler):
        :return: the label of the created tunnel
        """
        objects = self.client.list(tql, show=('r', 'p'), method='shell')
        if len(objects) != 1:
        if not objects:
            raise NotImplementedError('No objects matched by query')
        elif len(objects) != 1:
            raise NotImplementedError('Shell only support one tunnel at time for now')
        errs = Reporter()
        for obj in objects: