Skip to content

Commit

Permalink
Remove Python 2 references
Browse files Browse the repository at this point in the history
Removes references to Python 2 in the README.md and cleanups up some
code that had comments related to Python 2.

Note that this doesn't cleanup the distro packaging because I'm not sure
how those work

Signed-off-by: Joshua Watt <[email protected]>
  • Loading branch information
JPEWdev committed Mar 22, 2024
1 parent 53f26e6 commit 2889ea8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ python3 -m unittest -bv

## Project and maintainer

The bmaptool project implements bmap-related tools and API modules. The
entire project is written in python and supports python 2.7 and python 3.x.
The bmaptool project implements bmap-related tools and API modules. The entire
project is written in python

The project author is Artem Bityutskiy ([email protected]). The project
is currently maintained by:
Expand Down
9 changes: 1 addition & 8 deletions src/bmaptool/TransRead.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,15 +639,8 @@ def _print_warning(timeout):
for timeout in (10, None):
try:
f_obj = opener.open(url, timeout=timeout)
# Handling the timeout case in Python 2.7
except socket.timeout as err:
if timeout is not None:
_print_warning(timeout)
else:
raise Error("cannot open URL '%s': %s" % (url, err))
except URLError as err:
# Handling the timeout case in Python 2.6
if timeout is not None and isinstance(err.reason, socket.timeout):
if timeout is not None:
_print_warning(timeout)
else:
raise Error("cannot open URL '%s': %s" % (url, err))
Expand Down

0 comments on commit 2889ea8

Please sign in to comment.