diff --git a/reposync/rhncheck.py b/reposync/rhncheck.py index d757d81a8f223b908e17354020603bd3129d8be8..d00770105fbbe1e3582a802afaf81d0c88bc6be3 100755 --- a/reposync/rhncheck.py +++ b/reposync/rhncheck.py @@ -62,7 +62,11 @@ def get_uuids(input_data, uuid_names): cmd = f"subscription-manager register --activationkey {activation_key} --force --name {name} --org {org}" process = subprocess.Popen(cmd, stderr=subprocess.PIPE, shell=True, stdout=subprocess.PIPE) out, err = process.communicate() - uuids.append(out['body']['uuid']) + print(f"Output: {out}") + if err: + print(f"Error creating a new uuid: {err}") + sys.exit(1) + uuids.append(str(out).split('ID: ')[1].split('\n')[0]) break else: uuids.append(entry.get('uuid'))