Skip to content

Commit e76ab7f

Browse files
Merge pull request #307 from eywalker/master
Fix hick up with `help()` and better user response handling
2 parents 7e69559 + 0d14a22 commit e76ab7f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

datajoint/user_relations.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ def table_name(cls):
6161
"""
6262
:returns: the table name of the table formatted for mysql.
6363
"""
64+
if cls._prefix is None:
65+
raise AttributeError('Class prefix is not defined!')
6466
return cls._prefix + from_camel_case(cls.__name__)
6567

6668
@ClassProperty

datajoint/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def user_choice(prompt, choices=("yes", "no"), default=None):
2222
valid = False
2323
while not valid:
2424
response = input(prompt + ' [' + choice_list + ']: ')
25-
response = response if response else default
25+
response = response.lower() if response else default
2626
valid = response in choices
2727
return response
2828

0 commit comments

Comments
 (0)