~ubuntu-core-dev/update-manager/main

« back to all changes in this revision

Viewing changes to UpdateManager/Core/MetaRelease.py

  • Committer: Benjamin Drung
  • Date: 2023-02-13 13:03:40 UTC
  • Revision ID: benjamin.drung@canonical.com-20230213130340-i79sfmerzdctcpw3
Drop imports only needed for Python 2

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21
21
#  USA
22
22
 
23
 
from __future__ import absolute_import, print_function
24
 
 
25
23
import apt
26
24
import apt_pkg
27
25
import distro_info
28
26
 
29
 
try:
30
 
    import configparser
31
 
except ImportError:
32
 
    import ConfigParser as configparser
33
 
try:
34
 
    from http.client import BadStatusLine
35
 
except ImportError:
36
 
    from httplib import BadStatusLine
 
27
import configparser
 
28
from http.client import BadStatusLine
37
29
import logging
38
30
import email.utils
39
31
import os
42
34
import time
43
35
import threading
44
36
 
45
 
try:
46
 
    from urllib.parse import quote
47
 
    from urllib.request import Request, urlopen
48
 
    from urllib.error import HTTPError, URLError
49
 
except ImportError:
50
 
    from urllib2 import HTTPError, Request, URLError, urlopen, quote
 
37
from urllib.parse import quote
 
38
from urllib.request import Request, urlopen
 
39
from urllib.error import HTTPError, URLError
51
40
 
52
41
from .utils import (
53
42
    get_lang,