Skip to content

Commit

Permalink
remove py2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Mar 22, 2020
1 parent 03a3c0e commit c1b94a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
8 changes: 1 addition & 7 deletions ogs5py/tools/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,7 @@
import shutil
import tarfile
import zipfile

try: # PY3
from urllib.request import urlretrieve, urlopen
except ImportError: # PY2
from urllib import urlretrieve
from urllib2 import urlopen

from urllib.request import urlretrieve, urlopen
import tempfile
import platform
import lxml.html
Expand Down
10 changes: 2 additions & 8 deletions ogs5py/tools/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,10 @@
MULTI_FILES
"""
import sys
import numpy as np

# stringtype for python 2 and 3
if sys.version_info[0] == 2:
STRTYPE = basestring
"""type: base string type"""
else:
STRTYPE = str
"""type: base string type"""
STRTYPE = str
"""type: base string type"""

# keylists for the gli entries and templates for entries
EMPTY_GLI = {
Expand Down

0 comments on commit c1b94a6

Please sign in to comment.