Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Ignore .pyc files by default in migrations #43

Merged
merged 1 commit into from

2 participants

@brutasse

I deployed packaged django projects and for some reason I get .pyc files in my migrations directory.

This ignores them by default, although I'm not sure nashvegas should cry that loud when an extension isn't recognized. A RuntimeWarning is probably enough…

nashvegas/management/commands/upgradedb.py
((52 lines not shown))
number = int(match.group(1))
if ext in [".sql", ".py"]:
possible_migrations[database].append((number, full_path))
- else:
@paltman Owner
paltman added a note

Actually, I think we should just delete the entire else: condition. If there are any files other than .sql or .py just ignore them.

Can you just delete lines 138-140 and undo the whitespace changes? Much appreciated!

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@paltman paltman merged commit d561c01 into from
@paltman
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 13, 2012
  1. @brutasse
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 3 deletions.
  1. +0 −3  nashvegas/management/commands/upgradedb.py
View
3  nashvegas/management/commands/upgradedb.py
@@ -135,9 +135,6 @@ def _filter_down(self, stop_at=None):
number = int(match.group(1))
if ext in [".sql", ".py"]:
possible_migrations[database].append((number, full_path))
- else:
- raise MigrationError("Invalid migration file suffix %r "
- "(unsupported file type)" % ext)
for database, scripts in possible_migrations.iteritems():
applied = applied_migrations[database]
Something went wrong with that request. Please try again.