Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
fix: made provider retrieval more resilient
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Wagner committed Jan 12, 2024
1 parent cb8e6e1 commit f9d4cfa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions planqk/qiskit/client/backend_dtos.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ class PROVIDER(Enum):
IBM_CLOUD = "IBM_CLOUD"
TSYSTEMS = "TSYSTEMS"
QRYD = "QRYD"
UNKNOWN = "UNKNOWN"

@classmethod
def from_str(cls, provider_str):
try:
return PROVIDER(provider_str)
except KeyError:
return cls.UNKNOWN


class TYPE(Enum):
Expand Down

0 comments on commit f9d4cfa

Please sign in to comment.