[issue11220] https sslv3 error 14077417: illegal parameter

2015-12-15 Thread Hari Krishna Dara

Hari Krishna Dara added the comment:

Interesting... the posted Python code for 2.x didn't work for me on 2.6.9 on 
Mac OS X (10.10.5). The code in catch block further generates the below 
exception:

Traceback (most recent call last):
  File "/tmp/t.py", line 17, in connect
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, 
ssl_version=ssl.PROTOCOL_SSLv23)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ssl.py",
 line 338, in wrap_socket
suppress_ragged_eofs=suppress_ragged_eofs)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ssl.py",
 line 120, in __init__
self.do_handshake()
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ssl.py",
 line 279, in do_handshake
self._sslobj.do_handshake()
SSLError: [Errno 1] _ssl.c:493: error:140770FC:SSL 
routines:SSL23_GET_SERVER_HELLO:unknown protocol

Is there another workaround that is known to work with this version of Python?

--
nosy: +haridsv

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11220>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6966] Ability to refer to arguments in TestCase.fail* methods

2010-06-17 Thread Hari Krishna Dara

Changes by Hari Krishna Dara harid...@gmail.com:


--
nosy: +haridsv

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6966
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6966] Ability to refer to arguments in TestCase.fail* methods

2010-06-17 Thread Hari Krishna Dara

Hari Krishna Dara harid...@gmail.com added the comment:

Changing unittest.TestCase.failUnlessEqual() to something like this will be 
very useful:


def failUnlessEqual(self, first, second, msg=None):
Fail if the two objects are unequal as determined by the '=='
   operator. Argument msg could optionally include string format
   operators named lhs and rhs (e.g., %(lhs)r)

if not first == second:
raise self.failureException, \
  (msg or %(lhs)r != %(rhs)r) % dict(lhs=10, rhs=20)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6966
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6966] Ability to refer to arguments in TestCase.fail* methods

2010-06-17 Thread Hari Krishna Dara

Hari Krishna Dara harid...@gmail.com added the comment:

Oops... the dict part should have been dict(lhs=first, rhs=second):

def failUnlessEqual(self, first, second, msg=None):
Fail if the two objects are unequal as determined by the '=='
   operator. Argument msg could optionally include string format
   operators named lhs and rhs (e.g., %(lhs)r)

if not first == second:
raise self.failureException, \
  (msg or %(lhs)r != %(rhs)r) % dict(lhs=first, rhs=second)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6966
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2010-05-27 Thread Hari Krishna Dara

Hari Krishna Dara harid...@gmail.com added the comment:

I just hit up on this same bug and the class object(object): pass workaround 
worked fine. I too would like to know how safe this workaround is, could 
someone more insightful please comment on this?

--
nosy: +Hari.Krishna.Dara

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue672115
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2972] arguments and default path not set in site.py and sitecustomize.py

2009-05-12 Thread Hari Krishna Dara

Hari Krishna Dara harid...@gmail.com added the comment:

I hit exactly this same problem today trying to customize sys.path. We
conventionally use .pth file under site-packages to add our custom
library paths, but this is not convenient in development while switching
between branches/checkout directories, so I would like something like
this to work:

def updateADPath(dir):
 Determine the root of the AD code given the specific sub
directory and update sys.path. Returns 0 on success. 
pass

# First try the current directory. If not found, try the main script's
directory.
if updateADPath(os.getcwd()):
# If not absolute path, the script is in the current dir anyway,
which we have already tried.
if len(sys.argv)  0 and sys.argv[0] != '-c' and
os.path.isabs(sys.argv[0]):
   updateADPath(os.path.split(sys.argv[0])[0])

It works quite well as long as I run when the CWD is with in the branch
directory, but if it is outside (such as when running from a windows
shortcut) there is no way to determine the root. Is there an alternative
means to access the raw command-line arguments, it would help me provide
a partial workaround for this problem.

--
nosy: +haridsv

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2972
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com