Skip to content

Commit

Permalink
Merge pull request #401 from davidfsmith/master
Browse files Browse the repository at this point in the history
Fix for deleterevisions on Py3
  • Loading branch information
etianen committed May 7, 2015
2 parents e419121 + 561ea9b commit 9584eec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/reversion/management/commands/deleterevisions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -212,4 +216,4 @@ def handle(self, *app_labels, **options):
for item in revision_query:
item.delete()

print("Done")
print("Done")

0 comments on commit 9584eec

Please sign in to comment.