From 978b10a9b9f563d47145779148826d18f580ac57 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 18 Jun 2022 23:58:41 +0800 Subject: [PATCH] Update index.py --- plugins/swap/index.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/swap/index.py b/plugins/swap/index.py index 00386a26a..df5dc599f 100755 --- a/plugins/swap/index.py +++ b/plugins/swap/index.py @@ -147,9 +147,7 @@ def initdInstall(): if mw.isAppleSystem(): return "Apple Computer does not support" - data = mw.execShell('systemctl enable swap') - if data[0] == '': - return 'fail' + mw.execShell('systemctl enable swap') return 'ok' @@ -157,9 +155,7 @@ def initdUinstall(): if mw.isAppleSystem(): return "Apple Computer does not support" - data = mw.execShell('systemctl disable swap') - if data[0] == '': - return 'fail' + mw.execShell('systemctl disable swap') return 'ok' if __name__ == "__main__":