Skip to content

Lesson 5 - #5

Open
shulzhenkoas wants to merge 6 commits into
masterfrom
lesson-5
Open

Lesson 5#5
shulzhenkoas wants to merge 6 commits into
masterfrom
lesson-5

Conversation

@shulzhenkoas

Copy link
Copy Markdown
Owner

ДЗ Лекция 5

Comment thread task-5_easy_1.py
if not dir_name:
print("Укажите имя директории.")
return
dir_path = os.path.join(os.getcwd(), dir_name)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

отлично)

Comment thread task-5_normal_1.py
except FileNotFoundError:
print("Невозможно перейти в директорию: '{}'".format(dir_name))
except Exception as e:
print(e.__class__)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для данной программы хорошо выводить так exception. Но вообще в сообщении об ошибке должна быть и причина, по которой исключение брошено. print(e) будет более информативным

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants