Module: check_mk
Branch: master
Commit: 302028c5926b934697208d25f5f7b026570baec3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=302028c5926b93…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Oct 30 16:11:36 2015 +0100
Removed Python 2.3 compatibility code - 2.4 is the oldest supported version
---
modules/check_mk_base.py | 7 -------
web/htdocs/bi.py | 8 --------
web/htdocs/config.py | 8 --------
web/htdocs/dashboard.py | 7 -------
web/htdocs/htmllib.py | 6 ------
web/htdocs/livestatus.py | 7 -------
web/htdocs/views.py | 7 -------
web/htdocs/webapi.py | 7 -------
web/plugins/sidebar/bi.py | 7 -------
9 files changed, 64 deletions(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 6d743ca..ea758c3 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -65,13 +65,6 @@ import subprocess
# or define a new output function
# - Also create a function bail_out() for printing and error and exiting
-# Python 2.3 does not have 'set' in normal namespace.
-# But it can be imported from 'sets'
-try:
- set()
-except NameError:
- from sets import Set as set
-
#.
# .--Globals-------------------------------------------------------------.
# | ____ _ _ _ |
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index df1aea0..56c0a36 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -27,14 +27,6 @@
import config, re, pprint, time, views
from lib import *
-
-# Python 2.3 does not have 'set' in normal namespace.
-# But it can be imported from 'sets'
-try:
- set()
-except NameError:
- from sets import Set as set
-
# Datastructures and functions needed before plugins can be loaded
loaded_with_language = False
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index 0a0051d..f7aa6ca 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -36,14 +36,6 @@ try:
except:
import defaults_standalone as defaults
-# Python 2.3 does not have 'set' in normal namespace.
-# But it can be imported from 'sets'
-# FIXME: We should officially drop Python 2.3 support
-try:
- set()
-except NameError:
- from sets import Set as set
-
# FIXME: Make clear whether or not user related values should be part
# of the "config" module. Maybe move to dedicated module (userdb?). Then
# move all user related stuff there. e.g. html.user should also be moved
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index 069b64f..477c3d8 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -29,13 +29,6 @@ from valuespec import *
from lib import *
import wato
-# Python 2.3 does not have 'set' in normal namespace.
-# But it can be imported from 'sets'
-try:
- set()
-except NameError:
- from sets import Set as set
-
loaded_with_language = False
builtin_dashboards = {}
dashlet_types = {}
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 1e36f51..22a671c 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -53,12 +53,6 @@ except ImportError:
import json
from lib import *
-# Python 2.3 does not have 'set' in normal namespace.
-# But it can be imported from 'sets'
-try:
- set()
-except NameError:
- from sets import Set as set
# Only parse variable adhering to the following regular expressions
varname_regex = re.compile('^[\w\d_.%+-\\\*]+$')
diff --git a/web/htdocs/livestatus.py b/web/htdocs/livestatus.py
index 562345f..fb6865c 100644
--- a/web/htdocs/livestatus.py
+++ b/web/htdocs/livestatus.py
@@ -26,13 +26,6 @@
import socket, time, re
-# Python 2.3 does not have 'set' in normal namespace.
-# But it can be imported from 'sets'
-try:
- set()
-except NameError:
- from sets import Set as set
-
"""MK Livestatus Python API
This module allows easy access to Nagios via MK Livestatus.
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index ad9d264..e571785 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -28,13 +28,6 @@ import config, defaults, livestatus, time, os, re, pprint, time
import weblib, traceback, forms, valuespec, inventory, visuals
from lib import *
-# Python 2.3 does not have 'set' in normal namespace.
-# But it can be imported from 'sets'
-try:
- set()
-except NameError:
- from sets import Set as set
-
# Datastructures and functions needed before plugins can be loaded
loaded_with_language = False
diff --git a/web/htdocs/webapi.py b/web/htdocs/webapi.py
index 35eb977..eae3c50 100644
--- a/web/htdocs/webapi.py
+++ b/web/htdocs/webapi.py
@@ -28,13 +28,6 @@ from lib import *
from wato import API
import config
-# Python 2.3 does not have 'set' in normal namespace.
-# But it can be imported from 'sets'
-try:
- set()
-except NameError:
- from sets import Set as set
-
try:
import simplejson as json
except ImportError:
diff --git a/web/plugins/sidebar/bi.py b/web/plugins/sidebar/bi.py
index 10dfd25..be5c0d0 100644
--- a/web/plugins/sidebar/bi.py
+++ b/web/plugins/sidebar/bi.py
@@ -26,13 +26,6 @@
import bi
-# Python 2.3 does not have 'set' in normal namespace.
-# But it can be imported from 'sets'
-try:
- set()
-except NameError:
- from sets import Set as set
-
def render_bi_groups():
html.write("<ul>")
for group in bi.aggregation_groups():