Commit 82cd4dfa authored by Anael Beutot's avatar Anael Beutot Committed by Sébastien Luttringer
Browse files

Case coherency for error message

parent 3e1d862d
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -156,7 +156,7 @@ class Command_list(TqlCommand):
        # compute index width
        # compute index width
        indexw = max(int(math.log10(len(objs["objects"]))+1), len("index "))
        indexw = max(int(math.log10(len(objs["objects"]))+1), len("index "))
        if size_id + indexw >= term_width:
        if size_id + indexw >= term_width:
            raise cmdError("term width is too small")
            raise cmdError("Term width is too small")
        # build initial print order
        # build initial print order
        order = [ t for t in objs.get("order", []) if t in tags ]
        order = [ t for t in objs.get("order", []) if t in tags ]
        order.extend(sorted(set(tags.keys()) - set(order)))
        order.extend(sorted(set(tags.keys()) - set(order)))
@@ -243,7 +243,7 @@ class Command_list(TqlCommand):
        # check if the line width is not too small for this kind of listing,
        # check if the line width is not too small for this kind of listing,
        # 10 seem to be a good minimum value:
        # 10 seem to be a good minimum value:
        if term_width < 10:
        if term_width < 10:
            raise cmdError("term width is too small")
            raise cmdError("Term width is too small")
        # remove ignored tags
        # remove ignored tags
        for tag in self.options.ignore:
        for tag in self.options.ignore:
            if tag in objs["order"]:
            if tag in objs["order"]:
+1 −1
Original line number Original line Diff line number Diff line
@@ -64,7 +64,7 @@ class Command_history(Command):
        if len(argv) != 1:
        if len(argv) != 1:
            raise cmdBadArgument()
            raise cmdBadArgument()
        if not self.printer.history:
        if not self.printer.history:
            raise cmdError("not available")
            raise cmdError("Not available")
        for l in self.printer.history:
        for l in self.printer.history:
            self.printer.out(l)
            self.printer.out(l)