Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
1492 - migration fails when /v1 directory already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ipanova committed Feb 2, 2016
1 parent 9870a14 commit 9ab1c65
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/pulp_docker/plugins/migrations/0001_v2_support.py
Expand Up @@ -22,9 +22,10 @@ def migrate():
for folder in os.listdir(OLD_DOCKER_V1_PUBLISH_PATH):
if folder == 'v1':
continue
folder = os.path.join(OLD_DOCKER_V1_PUBLISH_PATH, folder)
if os.path.exists(folder):
shutil.move(folder, NEW_DOCKER_V1_PUBLISH_PATH)
source_folder = os.path.join(OLD_DOCKER_V1_PUBLISH_PATH, folder)
destination_folder = os.path.join(NEW_DOCKER_V1_PUBLISH_PATH, folder)
if os.path.exists(source_folder) and not os.path.exists(destination_folder):
shutil.move(source_folder, NEW_DOCKER_V1_PUBLISH_PATH)

# Now we must look for and repair broken symlinks
_repair_links()
Expand Down

0 comments on commit 9ab1c65

Please sign in to comment.