Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ sudo: false

language: python
python:
# - "2.5"
- "2.6"
- "2.7"

Expand Down
6 changes: 1 addition & 5 deletions src/collectors/bind/bind.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
import diamond.collector
import sys
import urllib2

if sys.version_info >= (2, 5):
import xml.etree.cElementTree as ElementTree
else:
import cElementTree as ElementTree
import xml.etree.cElementTree as ElementTree


class BindCollector(diamond.collector.Collector):
Expand Down
5 changes: 1 addition & 4 deletions src/collectors/endecadgraph/endecadgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
from StringIO import StringIO
import re
import sys
if sys.version_info >= (2, 5):
import xml.etree.cElementTree as ElementTree
else:
import cElementTree as ElementTree
import xml.etree.cElementTree as ElementTree


class EndecaDgraphCollector(diamond.collector.Collector):
Expand Down
6 changes: 1 addition & 5 deletions src/collectors/postfix/postfix.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@

from diamond.collector import str_to_bool

if sys.version_info < (2, 6):
from string import maketrans
DOTS_TO_UNDERS = maketrans('.', '_')
else:
DOTS_TO_UNDERS = {ord(u'.'): u'_'}
DOTS_TO_UNDERS = {ord(u'.'): u'_'}


class PostfixCollector(diamond.collector.Collector):
Expand Down
11 changes: 1 addition & 10 deletions src/diamond/utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,7 @@ def setup_logging(configfile, stdout=False):
log = logging.getLogger('diamond')

try:
if sys.version_info >= (2, 6):
logging.config.fileConfig(configfile,
disable_existing_loggers=False)
else:
# python <= 2.5 does not have disable_existing_loggers
# default was to always disable them, in our case we want to
# keep any logger created by handlers
logging.config.fileConfig(configfile)
for logger in logging.root.manager.loggerDict.values():
logger.disabled = 0
logging.config.fileConfig(configfile, disable_existing_loggers=False)

# if the stdout flag is set, we use the log level of the root logger
# for logging to stdout, and keep all loggers defined in the conf file
Expand Down
12 changes: 0 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@ setenv = VIRTUAL_ENV={envdir}
commands = {toxinidir}/test.py
sitepackages = False

[testenv:py24]
deps = {[testenv]deps}
simplejson
setenv =
PIP_INSECURE = 1

[testenv:py25]
deps = {[testenv]deps}
simplejson
setenv =
PIP_INSECURE = 1

[testenv:pep8]
deps = pep8==1.5.7
commands = pep8 --config=.pep8 src bin/diamond bin/diamond-setup build_doc.py setup.py test.py
Expand Down