Skip to content

Commit

Permalink
Handle unset environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Feb 26, 2018
1 parent ceddd43 commit 466dfc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions indra/sources/eidos/eidos_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ def _set_classpath():
# Look at all the parts of the CLASSPATH
for part in clp_parts:
# If REACH is on the CLASSPATH, remove it
if os.path.abspath(part) != rep:
if not rep or os.path.abspath(part) != rep:
new_clp_parts.append(part)
# If Eidos is not on the CLASSPATH, add it
if os.path.abspath(part) == eip:
if eip and os.path.abspath(part) == eip:
has_eidos = True
if not has_eidos:
if eip and not has_eidos:
new_clp_parts.append(eip)
# Set the new CLASSPATH
new_clp = ':'.join(new_clp_parts)
Expand Down
6 changes: 3 additions & 3 deletions indra/sources/reach/reach_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ def _set_classpath():
# Look at all the parts of the CLASSPATH
for part in clp_parts:
# If Eidos is on the CLASSPATH, remove it
if os.path.abspath(part) != eip:
if not eip or os.path.abspath(part) != eip:
new_clp_parts.append(part)
# If REACH is not on the CLASSPATH, add it
if os.path.abspath(part) == rep:
if rep and os.path.abspath(part) == rep:
has_reach = True
if not has_reach:
if rep and not has_reach:
new_clp_parts.append(rep)
# Set the new CLASSPATH
new_clp = ':'.join(new_clp_parts)
Expand Down

0 comments on commit 466dfc5

Please sign in to comment.