diff --git a/bat2geomap.py b/bat2geomap.py index 3684299..cc4e985 100644 --- a/bat2geomap.py +++ b/bat2geomap.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # TODO # Gatewayliste @@ -36,4 +36,4 @@ db.import_wikigps("http://freifunk.metameute.de/Knoten") m = GeoMapBuilder(db) -print(m.build().encode("utf8")) +print(m.build()) diff --git a/bat2nodes.py b/bat2nodes.py index 6c818a8..21e6f69 100644 --- a/bat2nodes.py +++ b/bat2nodes.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # TODO # Gatewayliste diff --git a/nodedb.py b/nodedb.py index a0e20e8..54fa309 100644 --- a/nodedb.py +++ b/nodedb.py @@ -3,18 +3,7 @@ from node import Node from link import Link from bs4 import BeautifulSoup - - -# Python2/3 compatiblity hacks -try: - from urllib.request import urlopen -except ImportError: - from urllib import urlopen - -try: - basestring -except NameError: - basestring = str +from urllib.request import urlopen class NodeDB: def __init__(self): @@ -170,7 +159,7 @@ class NodeDB: data = [] def maybe_strip(x): - if isinstance(x.string, basestring): + if isinstance(x.string, str): return x.string.strip() else: return ""