remove pre-python 2.6 compat code
This commit is contained in:
parent
5d23879cbf
commit
fd0f9c2403
|
@ -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
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Pango
|
||||
import cgi
|
||||
|
||||
import gpodder
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue