Browse files

Merge branch 'master' into feature.py3

  • Loading branch information...
mnaberez committed Apr 20, 2014
2 parents 96fd0eb + 83789d0 commit a0fc28051ea26ffc5f2144ab61e7bb146c3c0af6
@@ -1,6 +1,7 @@
@@ -1,11 +1,12 @@
# Configuration for Travis CI
language: python
- - "2.6"
- - "2.7"
- - "3.2"
- - "3.3"
-# command to run tests
+ - TOXENV=py26
+ - TOXENV=py27
+ - TOXENV=py32
+ - TOXENV=py33
+ - travis_retry pip install tox==1.6.1
- - python test -q
+ - travis_retry tox
@@ -1,105 +1,3 @@
-Supervisor Project Contributor Agreement
-The submitter agrees by adding his or her name within the section below named
-"Contributors" and submitting the resulting modified document to the
-canonical shared repository location for this software project (whether
-directly, as a user with "direct commit access", or via a "pull request"), he
-or she is signing a contract electronically. The submitter becomes a
-Contributor after a) he or she signs this document by adding their name
-beneath the "Contributors" section below, and b) the resulting document is
-accepted into the canonical version control repository.
-Treatment of Account
-Contributor will not allow anyone other than the Contributor to use his or
-her username or source repository login to submit code to a Supervisor Project
-source repository. Should Contributor become aware of any such use,
-Contributor will immediately by notifying Agendaless Consulting.
-Notification must be performed by sending an email to Until such notice is received, Contributor will be
-presumed to have taken all actions made through Contributor's account. If the
-Contributor has direct commit access, Agendaless Consulting will have
-complete control and discretion over capabilities assigned to Contributor's
-account, and may disable Contributor's account for any reason at any time.
-Legal Effect of Contribution
-Upon submitting a change or new work to a Supervisor Project source Repository
-(a "Contribution"), you agree to assign, and hereby do assign, a one-half
-interest of all right, title and interest in and to copyright and other
-intellectual property rights with respect to your new and original portions
-of the Contribution to Agendaless Consulting. You and Agendaless Consulting
-each agree that the other shall be free to exercise any and all exclusive
-rights in and to the Contribution, without accounting to one another,
-including without limitation, the right to license the Contribution to others
-under the Supervisor Public License. This agreement shall run with title to the
-Contribution. Agendaless Consulting does not convey to you any right, title
-or interest in or to the Program or such portions of the Contribution that
-were taken from the Program. Your transmission of a submission to the Supervisor
-Project source Repository and marks of identification concerning the
-Contribution itself constitute your intent to contribute and your assignment
-of the work in accordance with the provisions of this Agreement.
-License Terms
-Code committed to the Supervisor Project source repository (Committed Code)
-must be governed by the Repoze Public License (,
-aka "the RPL") or another license acceptable to Agendaless Consulting. Until
-Agendaless Consulting declares in writing an acceptable license other than
-the RPL, only the RPL shall be used. A list of exceptions is detailed within
-the "Licensing Exceptions" section of this document, if one exists.
-Representations, Warranty, and Indemnification
-Contributor represents and warrants that the Committed Code does not violate
-the rights of any person or entity, and that the Contributor has legal
-authority to enter into this Agreement and legal authority over Contributed
-Code. Further, Contributor indemnifies Agendaless Consulting against
-Contributor understands that cryptographic code may be subject to government
-regulations with which Agendaless Consulting and/or entities using Committed
-Code must comply. Any code which contains any of the items listed below must
-not be checked-in until Agendaless Consulting staff has been notified and has
-approved such contribution in writing.
-- Cryptographic capabilities or features
-- Calls to cryptographic features
-- User interface elements which provide context relating to cryptography
-- Code which may, under casual inspection, appear to be cryptographic.
-Contributor confirms that any notices required will be included in any
-Committed Code.
-Licensing Exceptions
-List of Contributors
-The below-signed are contributors to a code repository that is part of the
-project named "superlance".
-Each below-signed contributor has read, understand and agrees to the terms
-above in the section within this document entitled "Supervisor Project
-Contributor Agreement" as of the date beside his or her name.
No changes.
@@ -1,5 +1,5 @@
:command:`crashmailbatch` Documentation
:command:`crashmailbatch` is a supervisor "event listener", intended to be
subscribed to ``PROCESS_STATE`` and ``TICK_60`` events. It monitors
@@ -48,7 +48,7 @@ Command-Line Syntax
Override the TICK event name. Defaults to "TICK_60"
Configuring :command:`crashmailbatch` Into the Supervisor Config
An ``[eventlistener:x]`` section must be placed in :file:`supervisord.conf`
in order for :command:`crashmailbatch` to do its work. See the "Events" chapter in
@@ -58,5 +58,5 @@ The following example assumes that :command:`crashsms` is on your system
.. code-block:: ini
- crashsms --toEmail="<mobile number>@<sms email gateway>" --fromEmail=""
+ command=crashsms --toEmail="<mobile number>@<sms email gateway>" --fromEmail=""
@@ -1,5 +1,5 @@
:command:`fatalmailbatch` Documentation
:command:`fatalmailbatch` is a supervisor "event listener", intended to be
subscribed to ``PROCESS_STATE`` and ``TICK_60`` events. It monitors
@@ -45,7 +45,7 @@ Command-Line Syntax
Configuring :command:`fatalmailbatch` Into the Supervisor Config
An ``[eventlistener:x]`` section must be placed in :file:`supervisord.conf`
in order for :command:`fatalmailbatch` to do its work. See the "Events" chapter in
@@ -50,6 +50,9 @@ Contents:
+ crashmailbatch
+ fatalmailbatch
+ crashsms
Indices and tables
@@ -158,9 +158,6 @@ def main(argv=sys.argv):
any = False
sendmail = '/usr/sbin/sendmail -t -i'
email = None
- timeout = 10
- status = '200'
- inbody = None
optionalheader = None
for option, value in opts:
@@ -171,8 +171,6 @@ def runforever(self, test=False):
conn = ConnClass(hostport)
conn.timeout = self.timeout
- act = False
specs = self.listProcesses(ProcessStates.RUNNING)
if self.eager or len(specs) > 0:
@@ -181,7 +179,8 @@ def runforever(self, test=False):
self.timeout // (self.retry_time or 1) - 1 ,
-1, -1):
- conn.request('GET', path)
+ headers = {'User-Agent': 'httpok'}
+ conn.request('GET', path, headers=headers)
except socket.error as e:
if e.errno == 111 and will_retry:
@@ -204,7 +203,6 @@ def runforever(self, test=False):
subject = 'httpok for %s: bad status returned' % self.url
self.act(subject, msg)
elif self.inbody and self.inbody not in body:
- act = True
subject = 'httpok for %s: bad body returned' % self.url
self.act(subject, msg)
@@ -258,7 +256,6 @@ def write(msg):
- now = time.asctime()
message = '\n'.join(messages)
self.mail(, subject, message)
@@ -30,7 +30,6 @@ def _makeOnePopulated(self, programs, any, response=None):
def test_runforever_not_process_state_exited(self):
programs = {'foo':0, 'bar':0, 'baz_01':0 }
- groups = {}
any = None
prog = self._makeOnePopulated(programs, any)
prog.stdin.write('eventname:PROCESS_STATE len:0\n')
@@ -37,14 +37,15 @@ class TestConnection:
def __init__(self, hostport):
self.hostport = hostport
- def request(self, method, path):
+ def request(self, method, path, headers):
if exc:
if exc == True:
raise ValueError('foo')
raise exc.pop()
self.method = method
self.path = path
+ self.headers = headers
def getresponse(self):
return response
@@ -116,7 +117,6 @@ def test_listProcesses_w_nonRUNNING_programs_RUNNING_state(self):
def test_runforever_eager_notatick(self):
programs = {'foo':0, 'bar':0, 'baz_01':0 }
- groups = {}
any = None
prog = self._makeOnePopulated(programs, any)
prog.stdin.write('eventname:NOTATICK len:0\n')
@@ -1,6 +1,6 @@
envlist =
- py26,py27,py33
+ py26,py27,py32,py33
commands =

0 comments on commit a0fc280

Please sign in to comment.