mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 06:15:36 -04:00
Use context manager to read conf file.
This commit is contained in:
parent
290f5b8ce7
commit
8c4ff5cb63
1 changed files with 2 additions and 1 deletions
|
|
@ -70,7 +70,8 @@ class Installer(plugins_common.Plugin):
|
|||
self._set_config_dir()
|
||||
|
||||
self.fn = self.find_postfix_cf()
|
||||
self.raw_cf = open(self.fn).readlines()
|
||||
with open(self.fn) as f:
|
||||
self.raw_cf = f.readlines()
|
||||
self.cf = map(string.strip, self.raw_cf)
|
||||
#self.cf = [line for line in cf if line and not line.startswith("#")]
|
||||
# XXX ensure we raise the right kinds of exceptions
|
||||
|
|
|
|||
Loading…
Reference in a new issue