Extract parent dataset utils

This commit is contained in:
jonct 2024-07-15 00:51:17 -04:00
parent a6c5ebbb0c
commit 461cdf7cac
No known key found for this signature in database
2 changed files with 16 additions and 9 deletions

View File

@ -1287,15 +1287,6 @@ def run_command_and_parse_json(command):
return None return None
def get_all_jail_names():
try:
jail_names = os.listdir(JAILS_DIR_PATH)
except FileNotFoundError:
jail_names = []
return jail_names
def list_jails(): def list_jails():
""" """
List all available and running jails. List all available and running jails.

View File

@ -0,0 +1,16 @@
# SPDX-FileCopyrightText: © 2024 Jip-Hop and the Jailmakers <https://github.com/Jip-Hop/jailmaker>
#
# SPDX-License-Identifier: LGPL-3.0-only
import os
from donor.jlmkr import JAILS_DIR_PATH
def get_all_jail_names():
try:
jail_names = os.listdir(JAILS_DIR_PATH)
except FileNotFoundError:
jail_names = []
return jail_names