Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
makermelissa committed Sep 12, 2023
1 parent c6bf44c commit 3ede731
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adafruit_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ def chdir(self, directory):
# directory = self.getcwd() + "/" + directory
directory = self.path(directory)
if not self.exists(directory):
raise ValueError("Directory does not exist")
raise ValueError(f"Directory '{directory}' does not exist")
if not self.isdir(directory):
raise ValueError("Given location is not a directory")
raise ValueError(f"The given location '{directory}' is not a directory")
os.chdir(directory)

def pushd(self, directory):
Expand Down

0 comments on commit 3ede731

Please sign in to comment.