summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy <68817666+DBastrak@users.noreply.github.com>2021-07-09 19:27:01 +1000
committerGitHub <noreply@github.com>2021-07-09 19:27:01 +1000
commit56e8445d6465b9a42b68088f8f553171cfd7ee08 (patch)
tree8d147ef1088dc58195a08544b48225ec0f27b33d
parent4ed7145a440d9721acfb1e15e0971ed81f048a26 (diff)
downloadrdflib-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.py4
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()