diff options
| author | Martin Basti <mbasti@redhat.com> | 2016-10-31 13:22:08 +0100 |
|---|---|---|
| committer | Jan Cholasta <jcholast@redhat.com> | 2016-11-11 12:13:56 +0100 |
| commit | bbad08900bbe8f76e59b159cd2af800f5c089ca1 (patch) | |
| tree | c78813904a16a9a81209dd0bdd76cd11adcbead8 | |
| parent | 8cbbb5359155446be22a5efb1e2372e527d2d745 (diff) | |
| download | freeipa-bbad08900bbe8f76e59b159cd2af800f5c089ca1.tar.gz freeipa-bbad08900bbe8f76e59b159cd2af800f5c089ca1.tar.xz freeipa-bbad08900bbe8f76e59b159cd2af800f5c089ca1.zip | |
client: move clean CCACHE to module
According 04b8575c52410bb6d31e0e55f1cf431d7cc9c7c3 cleaning CCACHE is
needed after installation. This commit moves this cleanup from
ipa-client-install to client.install() function
https://fedorahosted.org/freeipa/ticket/6392
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
| -rwxr-xr-x | client/ipa-client-install | 5 | ||||
| -rw-r--r-- | ipaclient/install/client.py | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/client/ipa-client-install b/client/ipa-client-install index ecb3a14a4..98b2aa165 100755 --- a/client/ipa-client-install +++ b/client/ipa-client-install @@ -265,8 +265,3 @@ if __name__ == "__main__": sys.exit(1) except RuntimeError as e: sys.exit(e) - finally: - try: - os.remove(client.CCACHE_FILE) - except Exception: - pass diff --git a/ipaclient/install/client.py b/ipaclient/install/client.py index 95d8fcea9..440475b94 100644 --- a/ipaclient/install/client.py +++ b/ipaclient/install/client.py @@ -2285,6 +2285,16 @@ def install_check(options): def install(options): + try: + return _install(options) + finally: + try: + os.remove(CCACHE_FILE) + except Exception: + pass + + +def _install(options): env = {'PATH': SECURE_PATH} fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE) |
