diff --git a/robottelo/host_helpers/satellite_mixins.py b/robottelo/host_helpers/satellite_mixins.py index 4f469ef0d90..f6dbe08b7e4 100644 --- a/robottelo/host_helpers/satellite_mixins.py +++ b/robottelo/host_helpers/satellite_mixins.py @@ -141,13 +141,13 @@ def upload_manifest(self, org_id, manifest=None, interface='API', timeout=None): :returns: the manifest upload result """ - if manifest is None: + if manifest.content is None: manifest = clone() if timeout is None: # Set the timeout to 1500 seconds to align with the API timeout. timeout = 1500000 if interface == 'CLI': - if isinstance(manifest.content, (bytes, io.BytesIO)): + if hasattr(manifest, 'path'): self.put(f'{manifest.path}', f'{manifest.name}') result = self.cli.Subscription.upload( {'file': manifest.name, 'organization-id': org_id}, timeout=timeout diff --git a/robottelo/hosts.py b/robottelo/hosts.py index 37688b0c9d1..727e4f98c87 100644 --- a/robottelo/hosts.py +++ b/robottelo/hosts.py @@ -907,7 +907,7 @@ def put(self, local_path, remote_path=None): If local_path is a manifest object, write its contents to a temporary file then continue with the upload. """ - if 'utils.Manifest' in str(local_path): + if 'utils.manifest' in str(local_path): with NamedTemporaryFile(dir=robottelo_tmp_dir) as content_file: content_file.write(local_path.content.read()) content_file.flush()