Python 3-requiring example scripts should provide better error msg for python 2 users

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • TIRTOS
    • TIRTOS-1506
    • 3.50.00
    • 3.60.00
    • Hide
      If a user ran the python-3-requiring networking scripts using python 2, they get an error message:

      Traceback (most recent call last):
      File "./packages/examples/tools/udpSendReceive.py", line 119, in <module>
      buffer[-1] = (~i).to_bytes(sizeNegI + 1, byteorder='big', signed=True)[-1]
      AttributeError: 'int' object has no attribute 'to_bytes'

      Scripts that require Python 3 now detect if they are using python 2 and gives a more obvious message instead.
      Show
      If a user ran the python-3-requiring networking scripts using python 2, they get an error message: Traceback (most recent call last): File "./packages/examples/tools/udpSendReceive.py", line 119, in <module> buffer[-1] = (~i).to_bytes(sizeNegI + 1, byteorder='big', signed=True)[-1] AttributeError: 'int' object has no attribute 'to_bytes' Scripts that require Python 3 now detect if they are using python 2 and gives a more obvious message instead.

      Python 3-requiring example scripts should provide better error msg for python 2 users

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-1440 - Python 3-requiring example scripts ...
                SYNCHRONIZED
                • Last Sync Date: