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

NameError: global name 'descriptor' is not defined #461

Closed
liminspace opened this issue Dec 23, 2014 · 16 comments
Closed

NameError: global name 'descriptor' is not defined #461

liminspace opened this issue Dec 23, 2014 · 16 comments

Comments

@liminspace
Copy link

There is error if use in windows.
File _winapi.py:220

@descriptor.setter
def descriptor(self, value):
    self._descriptor = descriptor
    self.lpSecurityDescriptor = ctypes.addressof(descriptor)

Maybe must be so:

@descriptor.setter
def descriptor(self, value):
    self._descriptor = value
    self.lpSecurityDescriptor = ctypes.addressof(value)
@liminspace
Copy link
Author

Please fix it and update version.

@ThiefMaster
Copy link
Contributor

I'd love to see unittests for this kind of stuff... Also, using a decent IDE would show you that error immediately ;)

@liminspace
Copy link
Author

You are not seeing mistake in method "descriptor"? Variable "descriptor" does not exists in global namespace. There are simple things for which UnitTests are not necessary.

@ThiefMaster
Copy link
Contributor

Yes I do see the mistake. My comment was more directed to the paramiko devs than you. Having unit tests for e.g. the pageant integration would avoid such errors ending up in a release (same for the python3 issue related to bytestrings/unicode in the pageant interface of the previous version)

@liminspace
Copy link
Author

I agree with You :)

@lndbrg
Copy link
Contributor

lndbrg commented Dec 28, 2014

This is an open source product and you are always free to submit pull requests for improvements.

@perryjrandall
Copy link
Contributor

There is currently CI that should catch this kind of error and ensure compatibility with python2.6 - 3.4
https://travis-ci.org/paramiko/paramiko
Though it wont prevent you from committing AFAIK

@liminspace
Copy link
Author

Maybe this error is happening in Windows only. Your CI is working in linux.

@bitprophet
Copy link
Member

Unfortunately, Windows support is strictly on a user-driven basis as neither the developers' local platforms, nor the CI platform (Travis) support Windows. We'll usually merge pull requests that have multiple +1s from Windows users, & which are proven not to break POSIX platforms :)

@liminspace
Copy link
Author

Why this discussion, if there is an elementary error in the code that can be corrected in 5 seconds?

@hobbsd
Copy link

hobbsd commented Jan 8, 2015

+1

2 similar comments
@sanseihappa
Copy link

+1

@sorami
Copy link

sorami commented Jan 24, 2015

+1

@perryjrandall
Copy link
Contributor

@liminspace because talk is cheap XD

@mikedep333
Copy link

+1
@ThiefMaster's fix works fine

@bitprophet
Copy link
Member

Merging this with #469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants