diff options
author | Dmitriy <68817666+DBastrak@users.noreply.github.com> | 2021-07-09 19:27:01 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-09 19:27:01 +1000 |
commit | 56e8445d6465b9a42b68088f8f553171cfd7ee08 (patch) | |
tree | 8d147ef1088dc58195a08544b48225ec0f27b33d | |
parent | 4ed7145a440d9721acfb1e15e0971ed81f048a26 (diff) | |
download | rdflib-56e8445d6465b9a42b68088f8f553171cfd7ee08.tar.gz |
Updated film.py
Removes the need to add quotation marks in the user input which otherwise causes the program to loop at line 135 or crash at line 141.
-rw-r--r-- | examples/film.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/film.py b/examples/film.py index a23a3c0f..5c3dfc72 100644 --- a/examples/film.py +++ b/examples/film.py @@ -134,11 +134,11 @@ def main(argv=None): date = None while not date: try: - i = eval(input("Review date (YYYY-MM-DD): ")) + i = eval('"{}"'.format(input("Review date (YYYY-MM-DD): "))) date = datetime.datetime(*time.strptime(i, "%Y-%m-%d")[:6]) except: date = None - comment = eval(input("Comment: ")) + comment = eval('"{}"'.format(input("Comment: "))) s.new_review(movie, date, rating, comment) else: help() |