#940: Replace obsolete function `platform.linux_distribution` with `distro.os_release_attr`.
parent
d3dd7cfbac
commit
63576194e5
|
@ -10,7 +10,7 @@ Package: ogagent
|
|||
Section: admin
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: policykit-1(>=0.100), python-requests (>=0.8.2), python-qt4 (>=4.9), python-six(>=1.1), python-prctl(>=1.1.1), python (>=2.7), libxss1, ${misc:Depends}
|
||||
Depends: policykit-1(>=0.100), python-requests (>=0.8.2), python-qt4 (>=4.9), python-six(>=1.1), python-prctl(>=1.1.1), python-distro, python (>=2.7), libxss1, ${misc:Depends}
|
||||
Recommends: gnome-shell-extension-top-icons-plus
|
||||
Description: OpenGnsys Agent for Operating Systems
|
||||
This package provides the required components to allow this machine to work on an environment managed by OpenGnsys.
|
||||
|
|
|
@ -11,7 +11,7 @@ Release: %{release}
|
|||
Summary: OpenGnsys Agent for Operating Systems
|
||||
License: BSD3
|
||||
Group: Admin
|
||||
Requires: chkconfig initscripts python-six python-requests PyQt4 libXScrnSaver
|
||||
Requires: chkconfig initscripts python-six python-requests python-distro PyQt4 libXScrnSaver
|
||||
Vendor: OpenGnsys Project
|
||||
URL: https://opengnsys.es/
|
||||
Provides: ogagent
|
||||
|
|
|
@ -42,6 +42,7 @@ import subprocess
|
|||
import struct
|
||||
import array
|
||||
import six
|
||||
import distro
|
||||
from opengnsys import utils
|
||||
from .renamer import rename
|
||||
|
||||
|
@ -139,8 +140,10 @@ def getDomainName():
|
|||
|
||||
|
||||
def getLinuxVersion():
|
||||
lv = platform.linux_distribution()
|
||||
return lv[0] + ', ' + lv[1]
|
||||
"""
|
||||
Returns the version of the Linux distribution
|
||||
"""
|
||||
return distro.os_release_attr('pretty_name')
|
||||
|
||||
|
||||
def reboot(flags=0):
|
||||
|
|
|
@ -47,4 +47,4 @@ else:
|
|||
else:
|
||||
from .linux.operations import * # @UnusedWildImport
|
||||
os_type = 'Linux'
|
||||
os_version = getLinuxVersion().replace(',', '')
|
||||
os_version = getLinuxVersion()
|
||||
|
|
Loading…
Reference in New Issue