diff options
-rw-r--r-- | gemato/openpgp.py | 4 | ||||
-rw-r--r-- | tests/test_openpgp.py | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/gemato/openpgp.py b/gemato/openpgp.py index c27eef4..9d10d33 100644 --- a/gemato/openpgp.py +++ b/gemato/openpgp.py @@ -228,9 +228,7 @@ disable-scdaemon @property def home(self): - if self._home is None: - raise RuntimeError( - 'OpenPGPEnvironment has been closed') + assert self._home is not None return self._home def _spawn_gpg(self, options, stdin): diff --git a/tests/test_openpgp.py b/tests/test_openpgp.py index bbb6a8e..981f550 100644 --- a/tests/test_openpgp.py +++ b/tests/test_openpgp.py @@ -791,7 +791,7 @@ class OpenPGPContextManagerTest(unittest.TestCase): def test_home_after_close(self): with gemato.openpgp.OpenPGPEnvironment() as env: env.close() - with self.assertRaises(RuntimeError): + with self.assertRaises(AssertionError): env.home |