p3lib 1.1.78__tar.gz → 1.1.80__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {p3lib-1.1.78 → p3lib-1.1.80}/PKG-INFO +1 -1
- {p3lib-1.1.78 → p3lib-1.1.80}/setup.cfg +1 -1
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/bokeh_auth.py +2 -2
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/boot_manager.py +13 -11
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/table_plot.py +0 -1
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib.egg-info/PKG-INFO +1 -1
- {p3lib-1.1.78 → p3lib-1.1.80}/LICENSE +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/README.md +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/pyproject.toml +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/__init__.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/ate.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/bokeh_gui.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/conduit.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/database_if.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/helper.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/json_networking.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/mqtt_rpc.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/netif.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/netplotly.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/ngt.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/pconfig.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/ssh.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib/uio.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib.egg-info/SOURCES.txt +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib.egg-info/dependency_links.txt +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib.egg-info/requires.txt +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/src/p3lib.egg-info/top_level.txt +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/tests/test_conduit.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/tests/test_json_networking.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/tests/test_netif.py +0 -0
- {p3lib-1.1.78 → p3lib-1.1.80}/tests/test_ssh.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: p3lib
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.80
|
4
4
|
Summary: A group of python modules for networking, plotting data, config storage, automating boot scripts, ssh access and user input output.
|
5
5
|
Home-page: https://github.com/pjaos/p3lib
|
6
6
|
Author: Paul Austen
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[metadata]
|
2
2
|
name = p3lib
|
3
|
-
version = 1.1.
|
3
|
+
version = 1.1.80
|
4
4
|
author = Paul Austen
|
5
5
|
author_email = pausten.os@gmail.com
|
6
6
|
description = A group of python modules for networking, plotting data, config storage, automating boot scripts, ssh access and user input output.
|
@@ -321,9 +321,9 @@ class CredentialsManager(object):
|
|
321
321
|
username = self._uio.getInput('Enter the username: ')
|
322
322
|
password = self._uio.getInput('Enter the password: ')
|
323
323
|
if self.credentialsHasher.verify(username, password):
|
324
|
-
self._uio.info(
|
324
|
+
self._uio.info("The username and password match.")
|
325
325
|
else:
|
326
|
-
self._uio.error(
|
326
|
+
self._uio.error("The username and password do not match.")
|
327
327
|
|
328
328
|
def _showUsernames(self):
|
329
329
|
"""@brief Show the user a list of the usernames stored."""
|
@@ -15,24 +15,22 @@ class BootManager(object):
|
|
15
15
|
|
16
16
|
LINUX_OS_NAME = "Linux"
|
17
17
|
|
18
|
-
def __init__(self, uio=None, allowRootUser=False):
|
18
|
+
def __init__(self, uio=None, allowRootUser=True, ensureRootUser=False):
|
19
19
|
"""@brief Constructor
|
20
20
|
@param uio A UIO instance to display user output. If unset then no output
|
21
21
|
is displayed to user.
|
22
22
|
@param allowRootUser If True then allow root user to to auto start
|
23
|
-
programs.
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
it's config will not be found. If a program stores no config in
|
29
|
-
the home folder then this is not an issue."""
|
23
|
+
programs. Note that as the BootManager is responsible for
|
24
|
+
ensuring programs are started up when a machine boots up
|
25
|
+
the installed program should be installed for the root
|
26
|
+
user on Linux systems.
|
27
|
+
@param ensureRootUser If True the current user must be root user (Linux systems)."""
|
30
28
|
self._uio = uio
|
31
29
|
self._allowRootUser=allowRootUser
|
32
30
|
self._osName = platform.system()
|
33
31
|
self._platformBootManager = None
|
34
32
|
if self._osName == BootManager.LINUX_OS_NAME:
|
35
|
-
self._platformBootManager = LinuxBootManager(uio, self._allowRootUser)
|
33
|
+
self._platformBootManager = LinuxBootManager(uio, self._allowRootUser, ensureRootUser)
|
36
34
|
else:
|
37
35
|
raise Exception("{} is an unsupported OS.".format(self._osName) )
|
38
36
|
|
@@ -100,16 +98,20 @@ class LinuxBootManager(object):
|
|
100
98
|
raise Exception(f"{serviceFolder} folder not found.")
|
101
99
|
return serviceFolder
|
102
100
|
|
103
|
-
def __init__(self, uio, allowRootUser):
|
101
|
+
def __init__(self, uio, allowRootUser, ensureRootUser):
|
104
102
|
"""@brief Constructor
|
105
103
|
@param uio A UIO instance to display user output. If unset then no output is displayed to user.
|
106
|
-
@param allowRootUser If True then allow root user to to auto start programs.
|
104
|
+
@param allowRootUser If True then allow root user to to auto start programs.
|
105
|
+
@param ensureRootUser If True the current user must be root user."""
|
107
106
|
self._uio = uio
|
108
107
|
self._logFile = None
|
109
108
|
self._allowRootUser=allowRootUser
|
110
109
|
self._info("OS: {}".format(platform.system()) )
|
111
110
|
self._rootMode = False # If True run as root, else False.
|
112
111
|
self._systemCtlBin = LinuxBootManager.GetSystemCTLBin()
|
112
|
+
if ensureRootUser and os.geteuid() != 0:
|
113
|
+
self._fatalError(self.__class__.__name__ + ": Not root user. Ensure that you are root user and try again.")
|
114
|
+
|
113
115
|
if os.geteuid() == 0:
|
114
116
|
if not allowRootUser:
|
115
117
|
self._fatalError(self.__class__.__name__ + f": You are running as root user but allowRootUser={allowRootUser}.")
|
@@ -18,7 +18,6 @@ from bokeh.layouts import gridplot, row, column
|
|
18
18
|
from bokeh.plotting import figure, ColumnDataSource
|
19
19
|
from bokeh.palettes import Category20
|
20
20
|
from bokeh.models import HoverTool, Div
|
21
|
-
from bokeh.models import DatetimeTickFormatter
|
22
21
|
from bokeh.models.widgets.buttons import Button
|
23
22
|
from bokeh.models.widgets import TextInput
|
24
23
|
from bokeh.plotting import output_file, save
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: p3lib
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.80
|
4
4
|
Summary: A group of python modules for networking, plotting data, config storage, automating boot scripts, ssh access and user input output.
|
5
5
|
Home-page: https://github.com/pjaos/p3lib
|
6
6
|
Author: Paul Austen
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|