LNST-project/lnst

SecureSocket brings dep on python 2.7

Closed this issue · 2 comments

With the latest patchset we see following on RHEL6.8:

Traceback (most recent call last):
  File "./lnst-ctl", line 20, in <module>
    from lnst.Common.Logs import LoggingCtl, log_exc_traceback
  File "/root/lnst/lnst/Common/Logs.py", line 16, in <module>
    from lnst.Common.LoggingHandler import TransmitHandler
  File "/root/lnst/lnst/Common/LoggingHandler.py", line 20, in <module>
    from lnst.Common.ConnectionHandler import send_data
  File "/root/lnst/lnst/Common/ConnectionHandler.py", line 18, in <module>
    from lnst.Common.SecureSocket import SecureSocket, SecSocketException
  File "/root/lnst/lnst/Common/SecureSocket.py", line 38, in <module>
    DH_GROUP["q_size"] = DH_GROUP["q"].bit_length()/8
AttributeError: 'long' object has no attribute 'bit_length'

RHEL6.8 has Python 2.6.6, bit_length() is in Python since version 2.7.

Fixed by commit 37272c5