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

Drop _emerge/getloadavg.py #1383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/_emerge/JobStatusDisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import io
import sys
import time
import os

import portage
import portage.util.formatter as formatter
Expand All @@ -12,8 +13,6 @@
from portage import _unicode_encode
from portage.output import xtermTitle

from _emerge.getloadavg import getloadavg


class JobStatusDisplay:
# Used as maximum display width and default fallback value.
Expand Down Expand Up @@ -188,7 +187,7 @@ def _property_change(self, name, old_value, new_value):

def _load_avg_str(self):
try:
avg = getloadavg()
avg = os.getloadavg()
except OSError:
return "unknown"

Expand Down
5 changes: 2 additions & 3 deletions lib/_emerge/PollScheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
# Distributed under the terms of the GNU General Public License v2

import threading
import os

from portage.util.futures import asyncio
from portage.util._async.SchedulerInterface import SchedulerInterface
from portage.util._eventloop.global_event_loop import global_event_loop

from _emerge.getloadavg import getloadavg


class PollScheduler:
# max time between loadavg checks (seconds)
Expand Down Expand Up @@ -182,7 +181,7 @@ def _can_add_job(self):
and self._running_job_count() >= 1
):
try:
avg1, avg5, avg15 = getloadavg()
avg1, avg5, avg15 = os.getloadavg()
except OSError:
return False

Expand Down
4 changes: 2 additions & 2 deletions lib/_emerge/Scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import warnings
import weakref
import zlib
import os

import portage
from portage import os
Expand Down Expand Up @@ -49,7 +50,6 @@
from _emerge.EbuildPhase import EbuildPhase
from _emerge.emergelog import emergelog
from _emerge.FakeVartree import FakeVartree
from _emerge.getloadavg import getloadavg
from _emerge._find_deep_system_runtime_deps import _find_deep_system_runtime_deps
from _emerge._flush_elog_mod_echo import _flush_elog_mod_echo
from _emerge.JobStatusDisplay import JobStatusDisplay
Expand Down Expand Up @@ -1932,7 +1932,7 @@ def _job_delay(self):
self._sigcont_time = None

try:
avg1, avg5, avg15 = getloadavg()
avg1, avg5, avg15 = os.getloadavg()
except OSError:
return False

Expand Down
29 changes: 0 additions & 29 deletions lib/_emerge/getloadavg.py

This file was deleted.

1 change: 0 additions & 1 deletion lib/_emerge/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ py.install_sources(
'create_world_atom.py',
'depgraph.py',
'emergelog.py',
'getloadavg.py',
'help.py',
'is_valid_package_atom.py',
'main.py',
Expand Down
Loading