remove pre-python 2.6 compat code

This commit is contained in:
Eric Le Lay 2016-11-26 16:05:17 +01:00
parent 5d23879cbf
commit fd0f9c2403
7 changed files with 6 additions and 36 deletions

View file

@ -30,12 +30,7 @@ from gpodder import util
import logging
logger = logging.getLogger(__name__)
try:
# For Python < 2.6, we use the "simplejson" add-on module
import simplejson as json
except ImportError:
# Python 2.6 already ships with a nice "json" module
import json
import json
import re
import urllib.request, urllib.parse, urllib.error

View file

@ -19,7 +19,6 @@
from gi.repository import Gtk
from gi.repository import Pango
import cgi
import gpodder

View file

@ -22,7 +22,6 @@ from gi.repository import Gdk
from gi.repository import GObject
from gi.repository import Pango
import os
import cgi
import gpodder

View file

@ -26,12 +26,7 @@
import copy
from functools import reduce
try:
# For Python < 2.6, we use the "simplejson" add-on module
import simplejson as json
except ImportError:
# Python 2.6 already ships with a nice "json" module
import json
import json
class JsonConfigSubtree(object):

View file

@ -28,12 +28,7 @@ _ = gpodder.gettext
from gpodder import model
from gpodder import util
try:
# For Python < 2.6, we use the "simplejson" add-on module
import simplejson as json
except ImportError:
# Python 2.6 already ships with a nice "json" module
import json
import json
import os
import time

View file

@ -32,12 +32,7 @@ from gpodder import util
import logging
logger = logging.getLogger(__name__)
try:
# For Python < 2.6, we use the "simplejson" add-on module
import simplejson as json
except ImportError:
# Python 2.6 already ships with a nice "json" module
import json
import json
import re

View file

@ -30,20 +30,12 @@ import os.path
import logging
logger = logging.getLogger(__name__)
try:
import simplejson as json
except ImportError:
import json
import json
import re
import urllib.request, urllib.parse, urllib.error
try:
# Python >= 2.6
from urllib.parse import parse_qs
except ImportError:
# Python < 2.6
from cgi import parse_qs
from urllib.parse import parse_qs
# http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs
# format id, (preferred ids, path(?), description) # video bitrate, audio bitrate