diff --git a/backend/copr_backend/storage.py b/backend/copr_backend/storage.py index 9b969b390..568ce039d 100644 --- a/backend/copr_backend/storage.py +++ b/backend/copr_backend/storage.py @@ -12,7 +12,14 @@ def storage_for_job(job, opts, log): """ Return an appropriate storage object for a given job """ - if job.storage == StorageEnum.pulp: + return storage_for_enum(job.storage, opts, log) + + +def storage_for_enum(enum_value, opts, log): + """ + Return an appropriate `StorageEnum` value + """ + if enum_value == StorageEnum.pulp: return PulpStorage(opts, log) return BackendStorage(opts, log)