diff --git a/src/reversion/management/commands/deleterevisions.py b/src/reversion/management/commands/deleterevisions.py index 984961d9..009ba01a 100644 --- a/src/reversion/management/commands/deleterevisions.py +++ b/src/reversion/management/commands/deleterevisions.py @@ -195,6 +195,10 @@ def handle(self, *app_labels, **options): # Ask confirmation if confirmation: + try: + raw_input = raw_input + except NameError: + raw_input = input choice = raw_input("Are you sure you want to delete theses revisions? [y|N] ") if choice.lower() != "y": print("Aborting revision deletion.") @@ -212,4 +216,4 @@ def handle(self, *app_labels, **options): for item in revision_query: item.delete() - print("Done") \ No newline at end of file + print("Done")