diff options
author | drebs <drebs@leap.se> | 2013-04-29 17:05:35 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-04-29 17:05:35 -0300 |
commit | 058993485b6e10bbc07144252f2f4db9dd667b75 (patch) | |
tree | a8d2dc98de4384cf352815149f9b497d32827b1f | |
parent | df2ab40939dac3051371e44e4c66312ec693be15 (diff) |
Fix file left open in _has_symkey().
-rw-r--r-- | src/leap/soledad/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py index fe85bab9..96b05628 100644 --- a/src/leap/soledad/__init__.py +++ b/src/leap/soledad/__init__.py @@ -307,8 +307,8 @@ class Soledad(object): if not os.path.isfile(self._config.get_secret_path()): return False # is it symmetrically encrypted? - f = open(self._config.get_secret_path(), 'r') - content = f.read() + with open(self._config.get_secret_path(), 'r') as f: + content = f.read() if not self._crypto.is_encrypted_sym(content): raise DocumentNotEncrypted( "File %s is not encrypted!" % self._config.get_secret_path()) |