Skip to content

Commit 651b5a7

Browse files
committed
Update scripts
1 parent 9dfe3ce commit 651b5a7

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

source-code/paramiko/mam-balance.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
help='user name to connect as')
1414
options = arg_parser.parse_args()
1515
ssh = ssh.connect(options.host, options.user)
16-
module_func_defs = '. /apps/leuven/etc/bash.bashrc'
17-
cmd = '{0}; module load accounting; gbalance'.format(module_func_defs)
16+
cmd = '/opt/mam/bin/mam-balance'
1817
_, stdout, stderr = ssh.exec_command(cmd)
1918
for line in stdout:
2019
print(line.rstrip())

source-code/paramiko/module_av.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
arg_parser.add_argument('module', help='module to query for')
1515
options = arg_parser.parse_args()
1616
ssh = ssh.connect(options.host, options.user)
17-
module_func_defs = '. /apps/leuven/etc/bash.bashrc; . switch_to_2015a'
18-
cmd = '{0}; module av {1}'.format(module_func_defs, options.module)
19-
_, stdout, stderr = ssh.exec_command(cmd)
17+
cmd = f'bash -l -c module av {options.module};'
18+
_, stdout, stderr = ssh.exec_command(cmd, get_pty=True)
2019
for line in stdout:
2120
print(line.rstrip())
2221
for line in stderr:

0 commit comments

Comments
 (0)