summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/set_motd
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/tasks/set_motd')
-rw-r--r--kpov_judge/tasks/set_motd/task.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kpov_judge/tasks/set_motd/task.py b/kpov_judge/tasks/set_motd/task.py
index 5367577..f329773 100644
--- a/kpov_judge/tasks/set_motd/task.py
+++ b/kpov_judge/tasks/set_motd/task.py
@@ -50,7 +50,7 @@ computers = {
networks = { 'net1': {'public': False}, 'test-net': {'public': True} }
params_meta = {
- 'peer_ip': {'descriptions': {'si': 'IP računalnika'}, 'w': True, 'public':True, 'type': 'IP', 'generated': False},
+ 'peer_ip': {'descriptions': {'si': u'IP računalnika'}, 'w': True, 'public':True, 'type': 'IP', 'generated': False},
'peer_user': {'descriptions': {'si': 'ime uporabnika'}, 'w': False, 'public': True, 'type': 'username', 'generated': True},
'peer_passwd': {'descriptions': {'si': 'geslo uporabnika'}, 'w': True, 'public': True, 'type': 'alnumstr', 'generated': False},
'niz': {'w': False, 'public': True, 'type': 'short_text', 'generated': True},
@@ -63,7 +63,7 @@ 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)
- temp = 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
@@ -73,7 +73,7 @@ def gen_params(user_id, params_meta):
def task_check(results, params):
niz = params['niz']
- niz=niz.replace("#","")
+ niz=niz.replace("#","")
score = 0
if (results['motd'].find(niz) > -1):
score += 10