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 hwk py35 compatible #1

Open
3 tasks
jaypipes opened this issue Jun 2, 2017 · 0 comments
Open
3 tasks

Make hwk py35 compatible #1

jaypipes opened this issue Jun 2, 2017 · 0 comments
Labels

Comments

@jaypipes
Copy link
Owner

jaypipes commented Jun 2, 2017

In the course of adding some functional tests, I learned that hwk isn't python 3.5 compatible. There are a number of things that need to be addressed, including:

  • Replace sys.platform with platform.system() and use the key "Linux", not "linux2" (it's "linux" in py35 for some reason, but platform.system() returns "Linux" for both py27 and py35
  • Do not refer to dict keys using hard-coded string literals. Instead, need to use six.b(string_literal)
  • Need to remove the functor dict execution strategy because the KeyError catch was masking issues
@jaypipes jaypipes added the bug label Jun 2, 2017
jaypipes added a commit that referenced this issue Jun 2, 2017
Sometimes the physical memory cannot be determined without root privileges
because either the syslog doesn't exist or the user does not have the
privileges to read it. This can happen in containerized or reduced-privilege
environments. In these cases, fall back to using usable amount of memory, which
is always readable from /proc/meminfo.

Closes issue #2
Partly addresses issue #1
jaypipes added a commit that referenced this issue Jun 2, 2017
Adds a simple functional test for the CPU module and corrects some py35
compatibility issues found.

Addresses issue #1
jaypipes added a commit that referenced this issue Jun 2, 2017
Adds a simple functional test to exercise the block module. In the process,
makes the block and udev modules py35-compatible

Address Issue #1
jaypipes added a commit that referenced this issue Jun 3, 2017
Uncovered some py35-compat issues by adding a very simple functional test that
loops over the NICs in hwk.net.info()

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

No branches or pull requests

1 participant