mirror of https://github.com/n1nj4sec/pupy.git
Fix typo && var names
This commit is contained in:
parent
1e2bedb6e4
commit
8a7036310f
|
@ -30,7 +30,7 @@ script:
|
|||
after_success:
|
||||
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH; fi`
|
||||
- |
|
||||
if [ "$TRAVIS_REPO_SLUG" == "alxchk/pupy" ] && [ -z "$TRAVIS_PULL_REQUEST_SLUG" ]; then
|
||||
if [ "$TRAVIS_REPO_SLUG" = "alxchk/pupy" ] && [ -z "$TRAVIS_PULL_REQUEST_SLUG" ]; then
|
||||
docker login -u $DOCKER_USER -p $DOCKER_PASS &&
|
||||
cd $TRAVIS_BUILD_DIR/pupy &&
|
||||
docker push alxchk/pupy:$TAG >/dev/null;
|
||||
|
|
|
@ -7,7 +7,7 @@ import time
|
|||
import traceback
|
||||
|
||||
from rpyc.core import Connection, consts, brine
|
||||
from threading import Thread, Event, Lock, RLock, current_thread
|
||||
from threading import Thread, Lock, current_thread
|
||||
from Queue import Queue, Full, Empty
|
||||
|
||||
from network.lib import getLogger
|
||||
|
@ -30,24 +30,24 @@ def stream_dump(obj):
|
|||
|
||||
@brine.register(brine._dump_registry, str)
|
||||
def _dump_str_to_buffer(obj, stream):
|
||||
l = len(obj)
|
||||
if l == 0:
|
||||
obj_len = len(obj)
|
||||
if obj_len == 0:
|
||||
stream.append(brine.TAG_EMPTY_STR)
|
||||
return
|
||||
elif l < 5:
|
||||
if l == 1:
|
||||
elif obj_len < 5:
|
||||
if obj_len == 1:
|
||||
stream.append(brine.TAG_STR1)
|
||||
elif l == 2:
|
||||
elif obj_len == 2:
|
||||
stream.append(brine.TAG_STR2)
|
||||
elif l == 3:
|
||||
elif obj_len == 3:
|
||||
stream.append(brine.TAG_STR3)
|
||||
elif l == 4:
|
||||
elif obj_len == 4:
|
||||
stream.append(brine.TAG_STR4)
|
||||
else:
|
||||
if l < 256:
|
||||
stream.append(brine.TAG_STR_L1 + brine.I1.pack(l))
|
||||
if obj_len < 256:
|
||||
stream.append(brine.TAG_STR_L1 + brine.I1.pack(obj_len))
|
||||
else:
|
||||
stream.append(brine.TAG_STR_L4 + brine.I4.pack(l))
|
||||
stream.append(brine.TAG_STR_L4 + brine.I4.pack(obj_len))
|
||||
|
||||
stream.append(obj)
|
||||
|
||||
|
|
Loading…
Reference in New Issue