Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make config properties script Python3 compatible #910

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

remibergsma
Copy link
Member

No description provided.

@sanderv32
Copy link
Contributor

The CI/CD pipeline fails because on kvm1 and kvm2 python3 is missing:

-bash: /opt/cosmic/agent/./scripts/vm/hypervisor/kvm/send_config_properties_to_systemvm.py: /usr/bin/python3: bad interpreter: No such file or directory

@@ -66,16 +66,16 @@ def read_guest_file(path, write_count):

def get_key(key_file):
if not os.path.exists(key_file):
print("ERROR: ssh public key not found on host at {0}".format(key_file))
print "ERROR: Something went wrong, exiting."
print(("ERROR: ssh public key not found on host at {0}".format(key_file)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the double round brackets be removed?

sys.exit(1)

try:
with open(key_file, "r") as f:
pub_key = f.read()
except IOError as e:
print("ERROR: unable to open {0} - {1}".format(key_file, e.strerror))
print "ERROR: Something went wrong, exiting."
print(("ERROR: unable to open {0} - {1}".format(key_file, e.strerror)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the double round brackets be removed?

@sanderv32
Copy link
Contributor

go build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants