Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/vault.py
diff options
context:
space:
mode:
Diffstat (limited to 'tutorius/vault.py')
-rw-r--r--tutorius/vault.py5
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):