Skip to content

Commit bdaac3d

Browse files
committed
Update the options
1 parent b5f9811 commit bdaac3d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

bin/sbox

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,9 @@ parser.add_argument('--gpu', action = 'store_true', help = 'show gpu resources')
5454
parser.add_argument('--license', action = 'store_true', help = 'show available licenses')
5555
parser.add_argument('--reserve', action = 'store_true', help = 'show reservation')
5656
parser.add_argument('--topusage', action = 'store_true', help = 'show top usage users')
57-
if os.popen('which ldapsearch 2> /dev/null').read():
58-
parser.add_argument('--whodat', help = 'show users informations by uid', metavar = 'UID')
59-
parser.add_argument('--whodat2', help = 'show users informations by name', metavar = 'UNAME')
60-
if os.popen('which ssh-agent 2> /dev/null').read():
61-
parser.add_argument('--agent', choices = ['start','stop','list'], help = 'start/stop/list ssh-agents on the current host')
57+
parser.add_argument('--whodat', help = 'show users informations by uid', metavar = 'UID')
58+
parser.add_argument('--whodat2', help = 'show users informations by name', metavar = 'UNAME')
59+
parser.add_argument('--agent', choices = ['start','stop','list'], help = 'start/stop/list ssh-agents on the current host')
6260
args = parser.parse_args()
6361

6462
if len(sys.argv) == 1:
@@ -181,6 +179,7 @@ if args.ncpu:
181179
if len(part_cpu) == 0:
182180
print('No CPU partition found in the config file!')
183181
sys.exit(1)
182+
184183
print(' Number of CPUs '.center(90,'-'))
185184
for p in part_cpu:
186185
idle = os.popen(f"""
@@ -194,6 +193,7 @@ if args.ngpu:
194193
if len(part_gpu) == 0:
195194
print('No GPU partition found in the config file!')
196195
sys.exit(1)
196+
197197
print(' Number of GPUs '.center(90,'-'))
198198
for g in part_gpu:
199199
unavail = os.popen(f"""
@@ -275,6 +275,7 @@ if args.quota:
275275
if len(disk_quota) == 0:
276276
print('No disk found in the config file!')
277277
sys.exit(1)
278+
278279
gpn = os.popen(f"""
279280
echo $(groups {args.user} | grep -Po "(?<=: ).*")
280281
""").read().strip().split()

0 commit comments

Comments
 (0)