Skip to content

Commit

Permalink
Update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gjbex committed Apr 22, 2021
1 parent 9dfe3ce commit 651b5a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions source-code/paramiko/mam-balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
help='user name to connect as')
options = arg_parser.parse_args()
ssh = ssh.connect(options.host, options.user)
module_func_defs = '. /apps/leuven/etc/bash.bashrc'
cmd = '{0}; module load accounting; gbalance'.format(module_func_defs)
cmd = '/opt/mam/bin/mam-balance'
_, stdout, stderr = ssh.exec_command(cmd)
for line in stdout:
print(line.rstrip())
Expand Down
5 changes: 2 additions & 3 deletions source-code/paramiko/module_av.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
arg_parser.add_argument('module', help='module to query for')
options = arg_parser.parse_args()
ssh = ssh.connect(options.host, options.user)
module_func_defs = '. /apps/leuven/etc/bash.bashrc; . switch_to_2015a'
cmd = '{0}; module av {1}'.format(module_func_defs, options.module)
_, stdout, stderr = ssh.exec_command(cmd)
cmd = f'bash -l -c module av {options.module};'
_, stdout, stderr = ssh.exec_command(cmd, get_pty=True)
for line in stdout:
print(line.rstrip())
for line in stderr:
Expand Down

0 comments on commit 651b5a7

Please sign in to comment.