Skip to content

Commit

Permalink
Merge pull request xonsh#3464 from dyuri/issue_3055
Browse files Browse the repository at this point in the history
Fix for `AttributeError` in `LsColors` when `XonshSession` has no `en…
  • Loading branch information
gforsyth committed Mar 1, 2020
2 parents 97ab8d4 + fb00efc commit 1b1c668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xonsh/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ def detype(self):
@property
def style_name(self):
"""Current XONSH_COLOR_STYLE value"""
env = builtins.__xonsh__.env
env_style_name = env.get("XONSH_COLOR_STYLE")
env = getattr(builtins.__xonsh__, "env", {})
env_style_name = env.get("XONSH_COLOR_STYLE", "default")
if self._style_name is None or self._style_name != env_style_name:
self._style_name = env_style_name
self._style = self._dtyped = None
Expand Down

0 comments on commit 1b1c668

Please sign in to comment.