Skip to content

Commit

Permalink
Replace f-strings (for Py3.5)
Browse files Browse the repository at this point in the history
  • Loading branch information
smithara committed Aug 23, 2019
1 parent a782e34 commit 925bbdb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions viresclient/_client_swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,12 +552,16 @@ def set_collection(self, *args):
collections = [*args]
for collection in collections:
if not isinstance(collection, str):
raise TypeError(f"{collection} invalid. Must be string.")
raise TypeError(
"{} invalid. Must be string."
.format(collection)
)
for collection in collections:
if collection not in self._available["collections"]:
raise ValueError(
f"Invalid collection: {collection}. "
"Invalid collection: {}. "
"Check available with SwarmRequest.available_collections()"
.format(collection)
)
self._collection_list = collections
self._request_inputs.set_collections(collections)
Expand Down

0 comments on commit 925bbdb

Please sign in to comment.