Skip to content

Commit

Permalink
+ Fix filesystem conflict in tests
Browse files Browse the repository at this point in the history
+ Check length of list not length of index
  • Loading branch information
GerriorL authored and Liam Gerrior (lgerrior) committed Sep 25, 2024
1 parent 07c8163 commit 8c74cb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pyats/contrib/creators/creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def _construct_yaml(self, devices):
try:
# get port from ip
ad_port = row['ip'].strip().rsplit(':', 1)
address, port = ad_port[0], ad_port[1] if len(ad_port[1]) > 1 else None
address, port = ad_port[0], ad_port[1] if len(ad_port) > 1 else None
os = row.pop('os')

# build the connection dict
Expand Down
4 changes: 2 additions & 2 deletions src/pyats/contrib/creators/tests/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def setUp(self):
os: nxos
type: nxos
"""
self.test_csv_6 = "/tmp/test.csv"
self.output_6 = "/tmp/testbed.yaml"
self.test_csv_6 = "/tmp/test_6.csv"
self.output_6 = "/tmp/testbed_6.yaml"
with open(self.test_csv_6, "w") as csv_6:
csv_6.write(self.csv_file_6)

Expand Down

0 comments on commit 8c74cb7

Please sign in to comment.