REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.73 KB
Close
/lib/python3.6/site-packages/up2date_client/up2dateUtils.py
Text
Base64
# Client code for Update Agent # Copyright (c) 1999--2018 Red Hat, Inc. Distributed under GPLv2. # # Author: Preston Brown <pbrown@redhat.com> # Adrian Likins <alikins@redhat.com> # """utility functions for up2date""" import os import gettext import distro from up2date_client import config from up2date_client.pkgplatform import getPlatform t = gettext.translation('rhn-client-tools', fallback=True) # Python 3 translations don't have a ugettext method if not hasattr(t, 'ugettext'): t.ugettext = t.gettext _ = t.gettext def getVersion(): """ Returns the version of redhat-release rpm """ cfg = config.initUp2dateConfig() if cfg["versionOverride"]: return str(cfg["versionOverride"]) if getPlatform() == 'deb': return distro.codename() return distro.major_version() def getOSRelease(): """ Returns the name of the system """ if getPlatform() == 'deb': return 'Ubuntu' return "CloudLinux" def getArch(): if os.access("/etc/rpm/platform", os.R_OK): fd = open("/etc/rpm/platform", "r") platform = fd.read().strip() #bz 216225 #handle some replacements.. replace = {"ia32e-redhat-linux": "x86_64-redhat-linux"} if platform in replace: platform = replace[platform] return platform arch = os.uname()[4] if getPlatform() == 'deb': # On debian we only support i386 if arch in ['i486', 'i586', 'i686']: arch = 'i386' if arch == 'x86_64': arch = 'amd64' arch += '-debian-linux' return arch def version(): # substituted to the real version by the Makefile at installation time. return "3.0.3-1.module_el8.10.0+7020+fd2ced8d.cloudlinux"
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 14
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__pycache__
DIR
-
drwxr-xr-x
2026-05-29 07:17:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
clpwd.py
3.56 KB
lrw-r--r--
2026-04-24 15:42:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
config.py
13.26 KB
lrw-r--r--
2026-04-24 15:42:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
hardware.py
5.09 KB
lrw-r--r--
2026-04-24 15:42:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
pkgplatform.py
309 B
lrw-r--r--
2026-04-27 12:46:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
rhncli.py
7.46 KB
lrw-r--r--
2026-04-24 15:42:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
rhnreg.py
10.52 KB
lrw-r--r--
2026-04-24 15:42:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
rhnserver.py
8.54 KB
lrw-r--r--
2026-04-24 15:42:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
rpcServer.py
11.10 KB
lrw-r--r--
2026-04-24 15:42:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
statistics.py
1.27 KB
lrw-r--r--
2026-04-24 15:42:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
up2dateAuth.py
10.49 KB
lrw-r--r--
2026-04-24 15:42:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
up2dateErrors.py
7.99 KB
lrw-r--r--
2026-04-24 15:42:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
up2dateLog.py
2.06 KB
lrw-r--r--
2026-04-24 15:42:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
up2dateUtils.py
1.73 KB
lrw-r--r--
2026-04-27 12:46:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
0 B
lrw-r--r--
2026-04-24 15:42:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).