Patchwork [3,of,4,accept-scripts] accept: consistently return a boolean

login
register
mail settings
Submitter Augie Fackler
Date June 12, 2019, 4:52 a.m.
Message ID <eca3ad69186b71aceb65.1560315144@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/40435/
State New
Headers show

Comments

Augie Fackler - June 12, 2019, 4:52 a.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1560312768 14400
#      Wed Jun 12 00:12:48 2019 -0400
# Node ID eca3ad69186b71aceb657be4e884f2a199fa784c
# Parent  4ca38ec4124f43199bc03472af423af62cb72c31
accept: consistently return a boolean

Patch

diff --git a/accept.py b/accept.py
--- a/accept.py
+++ b/accept.py
@@ -124,7 +124,7 @@  class commitqueue(object):
     def accepted(self, commit):
         al = self.accepters(commit)
         if len(al) >= 2:
-            return al
+            return True
         return False
 
     def accepters(self, commit):
diff --git a/accepted b/accepted
--- a/accepted
+++ b/accepted
@@ -9,4 +9,4 @@  cq = accept.commitqueue(config.load().so
 for n in cq.commits():
     a = cq.accepted(n)
     if a:
-        print n, " ".join(a)
+        print n, " ".join(cq.accepters(n))