Respond to review comments: remove some __debug__ qualifiers.
@@ -1948,7 +1948,6 @@ class ResourceFile(models.Model):
# newfile is where it should be copied to.
target = get_resource_file_path(resource, newfile, folder=folder)
istorage = resource.get_irods_storage()
- if __debug__:
if not istorage.exists(source):
raise ValidationError("ResourceFile.create: source {} of copy not found"
.format(source))
@@ -1956,7 +1955,6 @@ class ResourceFile(models.Model):
istorage.copyFiles(source, target)
else:
istorage.moveFile(source, target)
- if __debug__:
if not istorage.exists(target):
raise ValidationError("ResourceFile.create: copy to target {} failed"
.format(target))
@@ -1966,7 +1964,6 @@ class ResourceFile(models.Model):
# file points to an existing iRODS file
target = get_resource_file_path(resource, file, folder=folder)
istorage = resource.get_irods_storage()
- if __debug__:
if not istorage.exists(target):
raise ValidationError("ResourceFile.create: target {} does not exist"
.format(target))
