summaryrefslogtreecommitdiffstats
path: root/src/linux/ogOperations.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/linux/ogOperations.py')
-rw-r--r--src/linux/ogOperations.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/linux/ogOperations.py b/src/linux/ogOperations.py
index 1502f40..147944f 100644
--- a/src/linux/ogOperations.py
+++ b/src/linux/ogOperations.py
@@ -17,5 +17,9 @@ def reboot():
def execCMD(cmd):
cmds = cmd.split(" ")
- result = subprocess.run(cmds, stdout=subprocess.PIPE)
- return result.stdout.decode('utf-8')
+ try:
+ result = subprocess.check_output(cmds)
+ except:
+ raise ValueError('Error: Incorrect command value')
+
+ return result.decode('utf-8')