diff options
author | JCTutorius <charlie@tutorius-dev.(none)> | 2009-11-05 20:13:55 (GMT) |
---|---|---|
committer | JCTutorius <charlie@tutorius-dev.(none)> | 2009-11-05 20:13:55 (GMT) |
commit | 6f15a67eab8c88ae43def2acd2cfaaa943c7537d (patch) | |
tree | 129454efe0a2a3e6dc9a44ccfcc2197193c31f0c /tutorius/vault.py | |
parent | 80c7d20f83d15890a31b5e0a584dfcb24fb3f2a6 (diff) |
Added code review modifications to Valut ressource managing.
Diffstat (limited to 'tutorius/vault.py')
-rw-r--r-- | tutorius/vault.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tutorius/vault.py b/tutorius/vault.py index 728cf64..7ec0a23 100644 --- a/tutorius/vault.py +++ b/tutorius/vault.py @@ -353,7 +353,7 @@ class Vault(object): @param file_path the file path of the resource to add @returns the resource_id of the resource """ - + assert os.path.isfile(file_path) # Get the tutorial path bundler = TutorialBundler(tutorial_guid) tutorial_path = bundler.get_tutorial_path(tutorial_guid) @@ -370,7 +370,6 @@ class Vault(object): # Copy the resource file in the vault if os.path.isdir(os.path.join(tutorial_path, RESOURCES_FOLDER)) == False: os.makedirs(os.path.join(tutorial_path, RESOURCES_FOLDER)) - assert os.path.isfile(file_path) shutil.copyfile(file_path, new_file_path) return file_name_appended @@ -392,7 +391,7 @@ class Vault(object): # Delete the resource os.remove(file_path) else: - print('File not found, no delete took place') + logging.info('File not found, no delete took place') @staticmethod def get_resource_path(tutorial_guid, resource_id): |