Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions migopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,10 @@ def ignore(self, spec_migr=None):
@task
def rollback(self, spec_migr):
"""Rollback specyfic migration"""
if spec_migr not in self.unregistered():
raise MigopyException(('Migration %s is not on unregistred ' +
'migrations list. Can not be executed') %
if spec_migr in self.unregistered():
raise MigopyException(('Migration %s is on unregistred ' +
'migrations list. ' +
'Can not be executed rollback') %
spec_migr)
spec_migr_name = re.sub('\.py$', '', spec_migr)
with cwd_in_syspath():
Expand Down