diff options
author | ss5781@student.uni-lj.si <ss5781@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-07 17:23:34 +0000 |
---|---|---|
committer | ss5781@student.uni-lj.si <ss5781@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-07 17:23:34 +0000 |
commit | 745f4923295d2de90bed9c8e44fcb6a1b96ae702 (patch) | |
tree | 31f904526479734b4349783d00635981d30cc444 | |
parent | 178969211c37d4b717d67b273b0afee86f008d55 (diff) |
set_motd, v nizu zamenjam morebitne pojavitve #, s praznim nizom
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@15 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
-rw-r--r-- | kpov_judge/tasks/set_motd/task.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kpov_judge/tasks/set_motd/task.py b/kpov_judge/tasks/set_motd/task.py index 8213ecd..7711648 100644 --- a/kpov_judge/tasks/set_motd/task.py +++ b/kpov_judge/tasks/set_motd/task.py @@ -66,7 +66,7 @@ def task(peer_ip, peer_user, peer_passwd, niz): s.login (peer_ip, peer_user, peer_passwd, original_prompt=r'{0}@.*:\~\$'.format(peer_user),auto_prompt_reset=False) 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 + #results['motd'] = s.before # print everything before the prompt. prvotna verzija return results def gen_params(user_id, params_meta): @@ -75,7 +75,6 @@ def gen_params(user_id, params_meta): def task_check(results, params): print task_url niz = params['niz'] - niz=niz.replace("#","") score = 0 if (results['motd'].find(niz) > -1): score += 10 |