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

Comments

Projects
None yet
9 participants
@liminspace

liminspace commented Dec 23, 2014

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

This comment has been minimized.

liminspace commented Dec 25, 2014

Please fix it and update version.

@ThiefMaster

This comment has been minimized.

Contributor

ThiefMaster commented Dec 28, 2014

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

@liminspace

This comment has been minimized.

liminspace commented Dec 28, 2014

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

This comment has been minimized.

Contributor

ThiefMaster commented Dec 28, 2014

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

This comment has been minimized.

liminspace commented Dec 28, 2014

I agree with You :)

@lndbrg

This comment has been minimized.

Contributor

lndbrg commented Dec 28, 2014

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

@perryjrandall

This comment has been minimized.

Contributor

perryjrandall commented Dec 29, 2014

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

This comment has been minimized.

liminspace commented Dec 29, 2014

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

@bitprophet

This comment has been minimized.

Member

bitprophet commented Jan 5, 2015

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

This comment has been minimized.

liminspace commented Jan 5, 2015

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

@hobbsd

This comment has been minimized.

hobbsd commented Jan 8, 2015

+1

2 similar comments
@sanseihappa

This comment has been minimized.

Contributor

sanseihappa commented Jan 21, 2015

+1

@sorami

This comment has been minimized.

sorami commented Jan 24, 2015

+1

@perryjrandall

This comment has been minimized.

Contributor

perryjrandall commented Jan 24, 2015

@liminspace because talk is cheap XD

@mikedep333

This comment has been minimized.

mikedep333 commented Jan 25, 2015

+1
@ThiefMaster's fix works fine

@bitprophet

This comment has been minimized.

Member

bitprophet commented Jan 27, 2015

Merging this with #469

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