-
Notifications
You must be signed in to change notification settings - Fork 40
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 Labcontroller compatible with Python 2 and Python 3 #227
base: python-3
Are you sure you want to change the base?
Conversation
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
…n function Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Signed-off-by: Martin Styk <mart.styk@gmail.com>
We were not able to find or create Copr project
Unless the HTTP status code above is >= 500, please check your configuration for:
|
DEPCMD := $(shell if [ -f /usr/bin/dnf ]; then echo "dnf builddep"; else echo "yum-builddep"; fi) | ||
SUBDIRS := $(shell if [[ $(BKR_PY3) == 0 ]]; then echo "Common Client documentation Server LabController IntegrationTests"; else echo "Common Client documentation"; fi) | ||
ifeq ($(BKR_PY3),1) | ||
DEPCMD := dnf builddep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your expectation is RHEL-7 will only run with python2 (the default) since dnf does not exist in RHEL-7.
import logging | ||
import time | ||
import socket | ||
import signal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you want to sort import files in alpha order? I think you did this last time. Up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely, this should be fixed.
stop_type = ['stop', 'abort', 'cancel'] | ||
msg to record if issuing Abort or Cancel """ | ||
def task_stop(self, task_id, stop_type, msg=None): | ||
"""tell the scheduler that we are stoping a task |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know if you want to fix the typo s/b 'stopping'? Up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix it.
/packit build |
predecessors.extend( | ||
self.greenlets[c["id"]] | ||
for c in six.itervalues(self.commands) | ||
if "power" in c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have expected an indent here on if. However, this is the original code.
|
||
def __enter__(self): | ||
makedirs_ignore(os.path.dirname(self.path), 0o755) | ||
created = False | ||
if self.create: | ||
try: | ||
# stdio does not have any mode string which corresponds to this | ||
# stdio does not have any mode string which corresponds to this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You must be running a script to produce these changes. They're too consistent to be humanly done.
@@ -93,7 +93,7 @@ def check_all_trees(ignore_errors=False, | |||
print('{0} is missing [Distro Tree ID {1}]'.format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be " instead of ' in this section? Looks like this change wasn't done in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's covered in another commit.
Can we get this rebased against the |
[b"a" * 4096] * 1001 + [b"This line shouldn't be in output"] + [b""] # EOT | ||
) | ||
|
||
result = _read_from_pipe(mock_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure I understand the purpose here. Did you want to assertEqual?
env["power_user"] = (command["power"].get("user") or "").encode("utf8") | ||
env["power_pass"] = (command["power"].get("passwd") or "").encode("utf8") | ||
env["power_mode"] = command["action"].encode("utf8") | ||
power_mapping = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice rewrite!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I covered everything and I'm fine with your changes. Lots of format changes mostly.
from glob import glob | ||
|
||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Martin: Further down in this file there exists a 'classifier' section which defines the following which perhaps you'd like to change?
'Programming Language :: Python :: 2.7',
I was looking at this file today and thought of you.
No description provided.