Skip to content

Commit

Permalink
added __str__ property on configuring object to make it print the pat…
Browse files Browse the repository at this point in the history
…h of the components. added python 3.8 to travis
  • Loading branch information
jojoduquartier committed Oct 19, 2019
1 parent c602192 commit 536cac6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: python
python:
- "3.6"
- "3.7"
- "3.8"
install:
- pip install -r requirements.txt
- pip install codecov
Expand Down
14 changes: 14 additions & 0 deletions dsdbmanager/configuring.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,17 @@ def reset_credentials(self):
self.write_credentials(flavor, name, username, password, credential_dict)

return None

def __str__(self):
dsc = "dsdbmanager configurer with:\n" # first line message

host_path = "- host file at: " + str(self.host_location) # second line
host_path = host_path.rjust(len(host_path) + 4) + '\n'

cred_path = "- credential file at: " + str(self.credential_location) # third line
cred_path = cred_path.rjust(len(cred_path) + 4) + '\n'

key_path = "- key located at: " + str(self.key_location) # fourth line
key_path = key_path.rjust(len(key_path) + 4)

return f"{dsc}{host_path}{cred_path}{key_path}"

0 comments on commit 536cac6

Please sign in to comment.