Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into feature.py3

Conflicts:
	.travis.yml
  • Loading branch information...
commit a0fc28051ea26ffc5f2144ab61e7bb146c3c0af6 2 parents 96fd0eb + 83789d0
@mnaberez mnaberez authored
View
1  .gitignore
@@ -1,6 +1,7 @@
.tox/
env*/
dist/
+docs/_build/
*.egg
*.egg-info
*.pyc
View
15 .travis.yml
@@ -1,11 +1,12 @@
# Configuration for Travis CI
language: python
-python:
- - "2.6"
- - "2.7"
- - "3.2"
- - "3.3"
-# command to run tests
+env:
+ - TOXENV=py26
+ - TOXENV=py27
+ - TOXENV=py32
+ - TOXENV=py33
+install:
+ - travis_retry pip install tox==1.6.1
script:
- - python setup.py test -q
+ - travis_retry tox
View
102 CONTRIBUTORS.txt
@@ -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
-webmaster@agendaless.com. 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 (http://repoze.org/LICENSE.txt,
-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
-violations.
-
-Cryptography
-------------
-
-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.
-
-Notices
--------
-
-Contributor confirms that any notices required will be included in any
-Committed Code.
-
-Licensing Exceptions
-====================
-
-None.
-
-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.
-
Contributors
------------
View
0  docs/_static/.gitkeep
No changes.
View
4 docs/crashmailbatch.rst
@@ -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
View
4 docs/crashsms.rst
@@ -58,5 +58,5 @@ The following example assumes that :command:`crashsms` is on your system
.. code-block:: ini
[eventlistener:crashsms]
- crashsms --toEmail="<mobile number>@<sms email gateway>" --fromEmail="supervisord@fubar.com"
- events=PROCESS_STATE,TICK_60
+ command=crashsms --toEmail="<mobile number>@<sms email gateway>" --fromEmail="supervisord@fubar.com"
+ events=PROCESS_STATE,TICK_60
View
4 docs/fatalmailbatch.rst
@@ -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
supervisord"
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
View
3  docs/index.rst
@@ -50,6 +50,9 @@ Contents:
httpok
crashmail
memmon
+ crashmailbatch
+ fatalmailbatch
+ crashsms
Indices and tables
==================
View
3  superlance/crashmail.py
@@ -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:
View
7 superlance/httpok.py
@@ -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):
try:
- conn.request('GET', path)
+ headers = {'User-Agent': 'httpok'}
+ conn.request('GET', path, headers=headers)
break
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):
waiting)
if self.email:
- now = time.asctime()
message = '\n'.join(messages)
self.mail(self.email, subject, message)
View
1  superlance/tests/crashmail_test.py
@@ -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')
View
4 superlance/tests/httpok_test.py
@@ -37,7 +37,7 @@ 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')
@@ -45,6 +45,7 @@ def request(self, method, path):
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')
View
2  tox.ini
@@ -1,6 +1,6 @@
[tox]
envlist =
- py26,py27,py33
+ py26,py27,py32,py33
[testenv]
commands =
Please sign in to comment.
Something went wrong with that request. Please try again.