Skip to content

Commit 26504bf

Browse files
committed
fix for linux and 2.7
1 parent 444e905 commit 26504bf

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

geosupport/geosupport.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,16 @@ def __init__(self, geosupport_path=None, geosupport_version=None):
2424
if geosupport_version is not None:
2525
config = ConfigParser()
2626
config.read(os.path.expanduser(USER_CONFIG))
27-
versions = dict(config['versions'].items())
27+
versions = dict(config.items('versions'))
2828
geosupport_path = versions[geosupport_version.lower()]
2929

3030
if geosupport_path is not None:
31+
if self.platform.startswith('linux'):
32+
raise GeosupportError(
33+
"geosupport_path and geosupport_version not valid with "
34+
"linux. You must set LD_LIBRARY_PATH and GEOFILES "
35+
"before running python."
36+
)
3137
os.environ['GEOFILES'] = os.path.join(geosupport_path, 'Fls\\')
3238
os.environ['PATH'] = ';'.join([
3339
i for i in os.environ['PATH'].split(';') if

0 commit comments

Comments
 (0)