diff options
author | ss5781@student.uni-lj.si <ss5781@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-11-09 15:49:26 +0000 |
---|---|---|
committer | ss5781@student.uni-lj.si <ss5781@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-11-09 15:49:26 +0000 |
commit | 06176d7400465a98ff9c2b873b06d9df22121773 (patch) | |
tree | 830f2bf55d00056cad4ad1465735b741b36987e8 /kpov_judge | |
parent | f3e2c6f2add893710dc9a54098acff13c5934a90 (diff) |
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@3 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge')
-rw-r--r-- | kpov_judge/tasks/set_motd/task.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kpov_judge/tasks/set_motd/task.py b/kpov_judge/tasks/set_motd/task.py index b4a14fc..0f3bcf8 100644 --- a/kpov_judge/tasks/set_motd/task.py +++ b/kpov_judge/tasks/set_motd/task.py @@ -63,7 +63,9 @@ 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) - results['motd'] = s.before # print everything before the prompt. + 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): @@ -71,6 +73,7 @@ def gen_params(user_id, params_meta): def task_check(results, params): niz = params['niz'] + niz=niz.replace("#","") score = 0 if (results['motd'].find(niz) > -1): score += 10 |