Skip to content

Commit

Permalink
Fix regression with environment variable checking
Browse files Browse the repository at this point in the history
Introduced in 0da9976.

Fixes #41.
  • Loading branch information
FichteFoll committed May 17, 2019
1 parent 0da9976 commit 8ccd2c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord_ipc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def _iter_path_candidates():
env_keys = ('XDG_RUNTIME_DIR', 'TMPDIR', 'TMP', 'TEMP')
for env_key in env_keys:
dir_path = os.environ.get(env_key)
if dir_path.endswith('snap.sublime-text'):
if dir_path and dir_path.endswith('snap.sublime-text'):
dir_path = dir_path[:-17]
if dir_path:
break
Expand Down

0 comments on commit 8ccd2c9

Please sign in to comment.