diff options
author | Guido Günther <agx@sigxcpu.org> | 2020-03-31 15:13:24 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2020-03-31 15:15:31 +0200 |
commit | a163721e4850a47f26bab088ac3c41e8167f718b (patch) | |
tree | adcb337110f80fdd0d9325d872e18fbdf5f618a4 /src/ppm/providerdb.py | |
parent | 805d20d132098b9123f5527ffd0a4e1b807fd5a9 (diff) |
Switch to python3
Diffstat (limited to 'src/ppm/providerdb.py')
-rw-r--r-- | src/ppm/providerdb.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ppm/providerdb.py b/src/ppm/providerdb.py index 0e35b59..bc90139 100644 --- a/src/ppm/providerdb.py +++ b/src/ppm/providerdb.py @@ -14,11 +14,12 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. +from builtins import object import os import logging from lxml import etree -from provider import Provider +from . provider import Provider class ProviderDB(object): """Proxy to mobile broadband provider database""" @@ -50,7 +51,7 @@ class ProviderDB(object): def _load_countries(self): try: - for line in file(self.country_codes, 'r'): + for line in open(self.country_codes, 'r'): if line[0] != '#': (code, country) = line.split('\t',2) self.__countries[code.lower()] = country.strip() |