Merge "Check for migration branch dir"
This commit is contained in:
commit
b36df68039
@ -139,8 +139,12 @@ def get_branch(release, revision, library_path, project):
|
||||
migration_dir = os.path.join(
|
||||
get_abs_path(migrations_dir), branch
|
||||
)
|
||||
# If a release has no migrations for a given branch, the branch
|
||||
# directory will not exist.
|
||||
if os.path.isdir(migration_dir):
|
||||
for file in os.listdir(migration_dir):
|
||||
if file.endswith('.py') and file.split('_')[0] == revision:
|
||||
if (file.endswith('.py') and
|
||||
file.split('_')[0] == revision):
|
||||
return branch
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user