From 6a44e4a589665a4947f9237bf78bae6f3fd61622 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Tue, 3 Jul 2018 22:00:32 +0200 Subject: [PATCH] Release 0.6: Don't raise exception when /etc/crypttab doesn't exist --- CHANGELOG.rst | 28 ++++++++++++++++++++++++++++ linux_utils/__init__.py | 4 ++-- linux_utils/crypttab.py | 9 +++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index dd7718c..3bd8e7e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,6 +11,34 @@ to `semantic versioning`_. .. _Keep a Changelog: http://keepachangelog.com/ .. _semantic versioning: http://semver.org/ +`Release 0.6`_ (2018-07-03) +--------------------------- + +- **Bug fix:** Don't raise an exception in ``parse_crypttab()`` when + ``/etc/crypttab`` doesn't exist. I ran into the exception that used to be + raised when I ran ``upgrade-remote-system`` (in debuntu-tools_) against a + server without any encrypted filesystems and was unpleasantly surprised that + my "upgrade && reboot && cleanup kernels" had aborted halfway 😇. + +- **Miscellaneous changes:** (lots of them) + + - Added this changelog and restructured the documentation. + - Integrated ``property_manager.sphinx`` to improve documentation. + - Minor changes to the ``setup.py`` script: + + - Added the ``license='MIT'`` key. + - Changed alpha trove classifier to beta. + - Added some additional trove classifiers. + + - Added usage messages of ``cryptdisks-start-fallback`` and + ``cryptdisks-stop-fallback`` to readme. + - Changed ``MANIFEST.in`` to include documentation in source distributions. + - Minor improvements to documentation of ``linux_utils.cli`` module. + - Bumped copyright to 2018. + + +.. _Release 0.6: https://github.com/xolox/python-linux-utils/compare/0.5...0.6 + `Release 0.5`_ (2017-06-24) --------------------------- diff --git a/linux_utils/__init__.py b/linux_utils/__init__.py index f42dfbc..2ea1ac0 100644 --- a/linux_utils/__init__.py +++ b/linux_utils/__init__.py @@ -1,7 +1,7 @@ # linux-utils: Linux system administration tools for Python. # # Author: Peter Odding -# Last Change: June 24, 2017 +# Last Change: July 3, 2018 # URL: https://linux-utils.readthedocs.io """Linux system administration tools for Python.""" @@ -24,7 +24,7 @@ 'coerce_size', ) -__version__ = '0.5' +__version__ = '0.6' """Semi-standard module versioning.""" diff --git a/linux_utils/crypttab.py b/linux_utils/crypttab.py index 1b7932d..2f1f470 100644 --- a/linux_utils/crypttab.py +++ b/linux_utils/crypttab.py @@ -72,6 +72,15 @@ def parse_crypttab(filename='/etc/crypttab', context=None): key_file='none', options=['luks', 'discard'], ) + + .. versionchanged:: 0.6 + It is not an error when `filename` doesn't exist, because of my + experience that ``/etc/crypttab`` doesn't exist in default Debian and + Ubuntu installations (unless that system was specifically set up with + root disk encryption using the installation wizard). This used to raise + an exception, but this was changed in `release 0.6`_. + + .. _release 0.6: https://linux-utils.readthedocs.io/changelog.html#release-0-6-2018-07-03 """ context = coerce_context(context) if context.is_file(filename):