Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor change to sshkey_paramiko.r2py. Replaced decode() with decode_next() #192

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

tongxin97
Copy link

Replaced the decode() function calls with decode_next(), since decode is not allowed for safety reasons.

See the relevant repyV1 commit that introduced that safety check:
SeattleTestbed/repy_v1@bc6b6b9

Also, the same changes made to sshkey_paramiko.repy:
SeattleTestbed/seattlelib_v1@2d1262e?diff=unified

@@ -94,9 +94,6 @@ class _sshkey_paramiko_BER(object):
def __init__(self, content=''):
self.content = content
self.idx = 0

def decode(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to add a comment to explain why you changed this. The reason is that at some point in the future, if we want to re-port the Paramiko library, we should know why this edit was done.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment. I added a simple explanation to where the decode function was. Is this okay?

def decode(self):
return self.decode_next()

# June 27, 2017: removed decode function, as it is not allowed by safe.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. (The Git metadata contains the date however, so there's no real need to add it to the comment.)

aaaaalbert added a commit to aaaaalbert/repy-doodles that referenced this pull request Jul 5, 2017
This just shows whether all non-UT RepyV2 files in this dir can
be put into a VirtualNamespace without errors.

If provided as a SeattleTestbed/seattlelib_v2 unit test, it would
have caught SeattleTestbed/seattlelib_v2#192 easily.

Note: This script doesn't provide `dylink` functions or the actual
RepyV2 API to the checked libraries yet!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants