p3lib 1.1.77__tar.gz → 1.1.79__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.
Files changed (31) hide show
  1. {p3lib-1.1.77 → p3lib-1.1.79}/PKG-INFO +1 -1
  2. {p3lib-1.1.77 → p3lib-1.1.79}/setup.cfg +1 -1
  3. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/boot_manager.py +10 -9
  4. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib.egg-info/PKG-INFO +1 -1
  5. {p3lib-1.1.77 → p3lib-1.1.79}/LICENSE +0 -0
  6. {p3lib-1.1.77 → p3lib-1.1.79}/README.md +0 -0
  7. {p3lib-1.1.77 → p3lib-1.1.79}/pyproject.toml +0 -0
  8. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/__init__.py +0 -0
  9. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/ate.py +0 -0
  10. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/bokeh_auth.py +0 -0
  11. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/bokeh_gui.py +0 -0
  12. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/conduit.py +0 -0
  13. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/database_if.py +0 -0
  14. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/helper.py +0 -0
  15. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/json_networking.py +0 -0
  16. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/mqtt_rpc.py +0 -0
  17. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/netif.py +0 -0
  18. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/netplotly.py +0 -0
  19. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/ngt.py +0 -0
  20. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/pconfig.py +0 -0
  21. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/ssh.py +0 -0
  22. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/table_plot.py +0 -0
  23. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib/uio.py +0 -0
  24. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib.egg-info/SOURCES.txt +0 -0
  25. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib.egg-info/dependency_links.txt +0 -0
  26. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib.egg-info/requires.txt +0 -0
  27. {p3lib-1.1.77 → p3lib-1.1.79}/src/p3lib.egg-info/top_level.txt +0 -0
  28. {p3lib-1.1.77 → p3lib-1.1.79}/tests/test_conduit.py +0 -0
  29. {p3lib-1.1.77 → p3lib-1.1.79}/tests/test_json_networking.py +0 -0
  30. {p3lib-1.1.77 → p3lib-1.1.79}/tests/test_netif.py +0 -0
  31. {p3lib-1.1.77 → p3lib-1.1.79}/tests/test_ssh.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p3lib
3
- Version: 1.1.77
3
+ Version: 1.1.79
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.77
3
+ version = 1.1.79
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.
@@ -15,18 +15,15 @@ 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):
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. We do not do this by default because often a programs
24
- configuration is stored in the users home path. E.G a config
25
- file in ~/.<configfilename> or ~/.config/<configfolder or filename>.
26
- If a program is started as root user then this config may not
27
- be present in the /root folder and so when the program is started
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."""
30
27
  self._uio = uio
31
28
  self._allowRootUser=allowRootUser
32
29
  self._osName = platform.system()
@@ -255,6 +252,9 @@ class LinuxBootManager(object):
255
252
  If set to None then the current user is used.
256
253
  @param argString The argument string that the program is to be launched with.
257
254
  @param enableSyslog If True enable stdout and stderr to be sent to syslog."""
255
+ if user is None:
256
+ user = self._username
257
+
258
258
  appName, absApp = self._getApp()
259
259
 
260
260
  serviceFile = self._getServiceFile(appName)
@@ -274,7 +274,8 @@ class LinuxBootManager(object):
274
274
  else:
275
275
  lines.append("StandardOutput=null")
276
276
  lines.append("StandardError=journal")
277
- lines.append("User={}".format(user))
277
+ if self._rootMode and user != 'root':
278
+ lines.append("User={}".format(user))
278
279
 
279
280
  #We add the home path env var so that config files (if stored in/under
280
281
  # the users home dir) can be found by the prgram.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p3lib
3
- Version: 1.1.77
3
+ Version: 1.1.79
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