Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions qiskit/providers/ibmq/ibmqsingleprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
import logging
from collections import OrderedDict

from marshmallow import ValidationError

from qiskit.providers import BaseProvider
from qiskit.providers.models import BackendConfiguration
from qiskit.providers.providerutils import filter_backends
from qiskit.validation.exceptions import ModelValidationError

from .api import IBMQConnector
from .ibmqbackend import IBMQBackend
Expand Down Expand Up @@ -101,7 +100,7 @@ def _discover_remote_backends(self):
provider=self._ibm_provider,
credentials=self.credentials,
api=self._api)
except ValidationError as ex:
except ModelValidationError as ex:
logger.warning(
'Remote backend "%s" could not be instantiated due to an '
'invalid config: %s',
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
qiskit-terra>=0.7,<0.8
marshmallow>=2.17.0,<3
requests>=2.19
requests-ntlm>=1.1.0
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

requirements = [
"qiskit-terra>=0.7,<0.8",
"marshmallow>=2.17.0,<3",
"requests>=2.19",
"requests-ntlm>=1.1.0",
]
Expand Down
4 changes: 3 additions & 1 deletion test/ibmq/test_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ def test_save_duplicate_accounts(self):
"""Test saving the same credentials twice."""
with custom_qiskitrc(), mock_ibmq_provider():
IBMQ.save_account('QISKITRC_TOKEN')
IBMQ.save_account('QISKITRC_TOKEN')
with self.assertWarns(UserWarning) as context_manager:
IBMQ.save_account('QISKITRC_TOKEN')

self.assertIn('Set overwrite', str(context_manager.warning))
# Compare the session accounts with the ones stored in file.
stored_accounts = read_credentials_from_qiskitrc()
self.assertEqual(len(stored_accounts), 1)
Expand Down