diff options
author | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-17 18:18:53 +0000 |
---|---|---|
committer | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-17 18:18:53 +0000 |
commit | 7512e2c7555c6e3536e1bcb6b3a328d4e9aced77 (patch) | |
tree | 19d0fd22d4b19a3d240191e896f2fe9d57ab9863 /kpov_judge/tasks/set_motd | |
parent | 3d5dfa916fef693611a7857f01174e6a39148f01 (diff) |
Added some comments/instructions in the task.py files, answered some questions in DEVELOPMENT-FAQ.txt
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@95 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/tasks/set_motd')
-rw-r--r-- | kpov_judge/tasks/set_motd/task.py | 2 |
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 2b44188..2c4ae0f 100644 --- a/kpov_judge/tasks/set_motd/task.py +++ b/kpov_judge/tasks/set_motd/task.py @@ -76,9 +76,11 @@ def task(peer_ip, peer_user, peer_passwd, niz): return {"hello": 'kitty'} results = dict() s = pxssh.pxssh() + #TODO (polz): tole bi utegnilo delovati http://pexpect.sourceforge.net/pxssh.html. Testirajte 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. + #TODO (polz): tole ni pravi pristop. Problem je bil v tem, da pxssh ni prav zaznal, kdaj je prijavljen. Glej link zgoraj. results['motd'] = temp.replace("#","") #zamenja vse pojavitve "#" s praznim stringom #results['motd'] = s.before # print everything before the prompt. prvotna verzija return results |