summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorss5781@student.uni-lj.si <ss5781@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2014-12-15 22:27:27 +0000
committerss5781@student.uni-lj.si <ss5781@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2014-12-15 22:27:27 +0000
commit80ae4790491ff3c3c10c8b6e6117177a956ddd8f (patch)
tree28415ea94a941dd79ca3078c24e186db7fdc2458
parent6dc6b6d972ee8ccbd331bb27215f954c53ecd337 (diff)
set_motd original_prompt, moram se malo razmislit
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@84 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
-rw-r--r--kpov_judge/tasks/set_motd/task.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/kpov_judge/tasks/set_motd/task.py b/kpov_judge/tasks/set_motd/task.py
index 6145111..2b44188 100644
--- a/kpov_judge/tasks/set_motd/task.py
+++ b/kpov_judge/tasks/set_motd/task.py
@@ -77,10 +77,12 @@ def task(peer_ip, peer_user, peer_passwd, niz):
results = dict()
s = pxssh.pxssh()
s.login (peer_ip, peer_user, peer_passwd, original_prompt=r'{0}@.*:\~\$'.format(peer_user),auto_prompt_reset=False)
+ #TODO original_prompt je za popravit
temp = s.before # print everything before the prompt.
results['motd'] = temp.replace("#","") #zamenja vse pojavitve "#" s praznim stringom
#results['motd'] = s.before # print everything before the prompt. prvotna verzija
return results
+ #
def gen_params(user_id, params_meta):
return kpov_random_helpers.default_gen(user_id, params_meta)