schlatterbeck / snxvpn

Command-line utility to connect to a Checkpoint SSL VPN
Other
66 stars 58 forks source link

unicode problem with py2.7 #3

Closed rhoerbe closed 7 years ago

rhoerbe commented 7 years ago

One-time Password: Traceback (most recent call last): File "/usr/bin/snxconnect", line 5, in main () File "/usr/lib/python2.7/site-packages/snxconnect.py", line 459, in main result = rq.login () File "/usr/lib/python2.7/site-packages/snxconnect.py", line 198, in login self.generate_snx_info () File "/usr/lib/python2.7/site-packages/snxconnect.py", line 137, in generate_snx_info , 1 # ??? TypeError: Struct() argument 1 must be string, not unicode

workaround: start with py3

schlatterbeck commented 7 years ago

Fixed, seems earlier python2.7 versions want the format argument to struct.pack to be string not unicode. Fortunately python3 also accepts a byte-string here.