Jump to content

Recommended Posts

Posted

Hallo

in meinem Python Programm tritt immer wieder ein Timeout auf. Den würde ich gerne abfangen, damit das Programm weiterläuft. Ich finde aber in der Doku keinen Hinweis wie ich die Error-Variable Error.TIMEOUT im Programm anwenden kann.

Gibt es dazu irgend ein Beispiel?

Posted
from tinkerforge.ip_connection import Error

try:
    ...
except Error as e:
    if e.value == Error.TIMEOUT:
        print "timeout error"
    else:
        print "other error"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...