summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/config.py
diff options
context:
space:
mode:
authorterryjreedy <tjreedy@udel.edu>2017-07-08 02:28:06 (GMT)
committerGitHub <noreply@github.com>2017-07-08 02:28:06 (GMT)
commit223c7e70e48eb6eed4aab3906fbe32b098faafe3 (patch)
tree84e345911d561e168bc84f647dcddd7b04d07ab6 /Lib/idlelib/config.py
parent24f2e19d68cc6ca563d2be5944d11d5f55a46918 (diff)
downloadcpython-223c7e70e48eb6eed4aab3906fbe32b098faafe3.zip
cpython-223c7e70e48eb6eed4aab3906fbe32b098faafe3.tar.gz
cpython-223c7e70e48eb6eed4aab3906fbe32b098faafe3.tar.bz2
bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (#2629)
Diffstat (limited to 'Lib/idlelib/config.py')
-rw-r--r--Lib/idlelib/config.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/idlelib/config.py b/Lib/idlelib/config.py
index 621e0bf..ed37f11 100644
--- a/Lib/idlelib/config.py
+++ b/Lib/idlelib/config.py
@@ -172,10 +172,10 @@ class IdleConf:
"Populate default and user config parser dictionaries."
#build idle install path
if __name__ != '__main__': # we were imported
- idleDir=os.path.dirname(__file__)
+ idleDir = os.path.dirname(__file__)
else: # we were exec'ed (for testing only)
- idleDir=os.path.abspath(sys.path[0])
- userDir=self.GetUserCfgDir()
+ idleDir = os.path.abspath(sys.path[0])
+ self.userdir = userDir = self.GetUserCfgDir()
defCfgFiles = {}
usrCfgFiles = {}