Skip to content

Commit

Permalink
python 2.7 needs a local version of entire URL data - fixes bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kinverarity1 committed Oct 27, 2017
1 parent 4d6678c commit c35ffe8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lasio/reader.py
Expand Up @@ -78,7 +78,8 @@ def open_file(file_ref,
if URL_REGEXP.match(first_line): # it's a URL
try:
import urllib2
file_ref = urllib2.urlopen(first_line)
url_ref = urllib2.urlopen(first_line)
file_ref = StringIO(url_ref.read())
except ImportError:
import urllib.request
response = urllib.request.urlopen(file_ref)
Expand Down

0 comments on commit c35ffe8

Please sign in to comment.