comparison shelltools/query-pr/query.py @ 49:4b7f0ee35994

Use != in python and <> in sql.
author David A. Holland
date Sat, 02 Apr 2022 18:10:30 -0400
parents 3d5adf5a59d0
children bb0ece71355e
comparison
equal deleted inserted replaced
48:3d5adf5a59d0 49:4b7f0ee35994
794 sys.stderr.write("No PRs matched.\n") 794 sys.stderr.write("No PRs matched.\n")
795 exit(1) 795 exit(1)
796 796
797 print_prs(ids) 797 print_prs(ids)
798 elif sel.type == S_MESSAGE: 798 elif sel.type == S_MESSAGE:
799 if len(ids) <> 1: 799 if len(ids) != 1:
800 sys.stderr.write("Cannot retrieve messages " + 800 sys.stderr.write("Cannot retrieve messages " +
801 "from multiple PRs.") 801 "from multiple PRs.")
802 exit(1) 802 exit(1)
803 print_message(ids[0], sel.message) 803 print_message(ids[0], sel.message)
804 elif sel.type == S_ATTACHMENT: 804 elif sel.type == S_ATTACHMENT:
805 if len(ids) <> 1: 805 if len(ids) != 1:
806 sys.stderr.write("Cannot retrieve attachments " + 806 sys.stderr.write("Cannot retrieve attachments " +
807 "from multiple PRs.") 807 "from multiple PRs.")
808 exit(1) 808 exit(1)
809 print_message(ids[0], sel.attachment) 809 print_message(ids[0], sel.attachment)
810 else: 810 else:
943 if s.publiconly: 943 if s.publiconly:
944 qb2.addwhere("not %s" % qb.getfield("confidential")) 944 qb2.addwhere("not %s" % qb.getfield("confidential"))
945 945
946 orders = [compile_order(qb2, o) for o in s.orders] 946 orders = [compile_order(qb2, o) for o in s.orders]
947 order = ", ".join(orders) 947 order = ", ".join(orders)
948 if order <> "": 948 if order != "":
949 qb2.setorder(order) 949 qb2.setorder(order)
950 950
951 if qb2.nonempty(): 951 if qb2.nonempty():
952 qb2.addjoin(query, "search") 952 qb2.addjoin(query, "search")
953 qb2.addjoin("PRs") 953 qb2.addjoin("PRs")