aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-04-17 16:00:27 +0300
committerBonfaceKilz2024-04-30 13:09:46 +0300
commit1b325ef96d36f75954f5922376457cf68451c1fd (patch)
treeec405c18865fdfe4e59107b3f20cf6a2580ad94f /gn2
parent86935283cbf1dfe5094756042f6138ec9ab1e4b4 (diff)
downloadgenenetwork2-1b325ef96d36f75954f5922376457cf68451c1fd.tar.gz
Delete __run__cmd__.
* gn2/wqflask/edit.py (__run_cmd__): Delete. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/edit.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/gn2/wqflask/edit.py b/gn2/wqflask/edit.py
index 33772375..c0456615 100644
--- a/gn2/wqflask/edit.py
+++ b/gn2/wqflask/edit.py
@@ -25,26 +25,6 @@ from gn2.wqflask.oauth2.checks import require_oauth2_edit_resource_access
metadata = Blueprint("metadata", __name__)
-def __run_cmd__(cmd) -> Either:
- """Run a given command and return it's results as an Either monad"""
- _result = ""
- try:
- _result = subprocess.run(
- cmd, capture_output=True
- )
- except Exception as e_:
- return Left({
- "command": cmd,
- "error": str(e_),
- })
- if _result.stderr:
- return Left({
- "command": cmd,
- "error": _result.stderr.decode()
- })
- return Right(_result.stdout)
-
-
@metadata.route("/edit")
@require_oauth2_edit_resource_access
@require_oauth2