diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2008-05-05 08:52:09 +0200 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2008-05-05 08:52:09 +0200 |
commit | 1305a73de53853a35a8b27e0b8a37d316bceeef3 (patch) | |
tree | 6049717408026e6e708953f88e9717a9ce9685f5 /config.py | |
parent | 2236bb1177d0200105170d5190fd5c3e14e0b501 (diff) | |
download | pylint-git-1305a73de53853a35a8b27e0b8a37d316bceeef3.tar.gz |
fix USER_HOME name error when PYLINTHOME env var is defined
Diffstat (limited to 'config.py')
-rw-r--r-- | config.py | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -21,18 +21,19 @@ import pickle import os import sys -from os.path import exists, isfile, join, expanduser, abspath +from os.path import exists, isfile, join, expanduser, abspath, dirname # pylint home is used to save old runs results ################################ +USER_HOME = expanduser('~') if os.environ.has_key('PYLINTHOME'): PYLINT_HOME = os.environ['PYLINTHOME'] + if USER_HOME === '~': + USER_HOME = dirname(PYLINT_HOME) +elif USER_HOME == '~': + PYLINT_HOME = ".pylint.d" else: - USER_HOME = expanduser('~') - if USER_HOME == '~': - PYLINT_HOME = ".pylint.d" - else: - PYLINT_HOME = join(USER_HOME, '.pylint.d') + PYLINT_HOME = join(USER_HOME, '.pylint.d') if not exists(PYLINT_HOME): try: |