p3lib 1.1.71__tar.gz → 1.1.73__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 (30) hide show
  1. {p3lib-1.1.71 → p3lib-1.1.73}/PKG-INFO +1 -1
  2. {p3lib-1.1.71 → p3lib-1.1.73}/setup.cfg +1 -1
  3. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/database_if.py +1 -1
  4. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/ssh.py +10 -0
  5. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib.egg-info/PKG-INFO +1 -1
  6. {p3lib-1.1.71 → p3lib-1.1.73}/LICENSE +0 -0
  7. {p3lib-1.1.71 → p3lib-1.1.73}/README.md +0 -0
  8. {p3lib-1.1.71 → p3lib-1.1.73}/pyproject.toml +0 -0
  9. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/__init__.py +0 -0
  10. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/ate.py +0 -0
  11. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/bokeh_auth.py +0 -0
  12. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/bokeh_gui.py +0 -0
  13. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/boot_manager.py +0 -0
  14. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/conduit.py +0 -0
  15. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/helper.py +0 -0
  16. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/json_networking.py +0 -0
  17. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/mqtt_rpc.py +0 -0
  18. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/netif.py +0 -0
  19. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/netplotly.py +0 -0
  20. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/pconfig.py +0 -0
  21. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/table_plot.py +0 -0
  22. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib/uio.py +0 -0
  23. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib.egg-info/SOURCES.txt +0 -0
  24. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib.egg-info/dependency_links.txt +0 -0
  25. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib.egg-info/requires.txt +0 -0
  26. {p3lib-1.1.71 → p3lib-1.1.73}/src/p3lib.egg-info/top_level.txt +0 -0
  27. {p3lib-1.1.71 → p3lib-1.1.73}/tests/test_conduit.py +0 -0
  28. {p3lib-1.1.71 → p3lib-1.1.73}/tests/test_json_networking.py +0 -0
  29. {p3lib-1.1.71 → p3lib-1.1.73}/tests/test_netif.py +0 -0
  30. {p3lib-1.1.71 → p3lib-1.1.73}/tests/test_ssh.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p3lib
3
- Version: 1.1.71
3
+ Version: 1.1.73
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.71
3
+ version = 1.1.73
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.
@@ -154,7 +154,7 @@ class DatabaseIF(object):
154
154
 
155
155
  def connectNoDB(self):
156
156
  """@brief connect to the database server."""
157
- self._info("Connecting to {}:{}".format(self._dbConfig.serverAddress, self._dbConfig.serverPort))
157
+ self._info("Connecting to database server @ {}:{}".format(self._dbConfig.serverAddress, self._dbConfig.serverPort))
158
158
  self._dbCon = mysqldb.Connection(host=self._dbConfig.serverAddress,\
159
159
  port=self._dbConfig.serverPort,\
160
160
  user=self._dbConfig.username,\
@@ -122,6 +122,7 @@ class SSH(object):
122
122
  PRIVATE_KEY_FILE_LIST = ["id_rsa", "id_dsa", 'id_ecdsa']
123
123
  PUBLIC_KEY_FILE_LIST = ["id_rsa.pub", "id_dsa.pub", 'id_ecdsa.pub']
124
124
  LOCAL_SSH_CONFIG_PATH = os.path.join(os.path.expanduser("~"), ".ssh")
125
+ DEFAULT_REMOTE_SSH_CONFIG_FOLDER = "~/.ssh"
125
126
  DEFAULT_REMOTE_SSH_AUTH_KEYS_FILE = "~/.ssh/authorized_keys"
126
127
  DROPBEAR_DIR = "/etc/dropbear"
127
128
  DROPBEAR_AUTH_KEYS_FILE = "%s/authorized_keys" % (DROPBEAR_DIR)
@@ -520,8 +521,17 @@ class SSH(object):
520
521
 
521
522
  cmd = "test -d %s" % (SSH.DROPBEAR_DIR)
522
523
  rc, stdoutLines, stderrLines = self.runCmd(cmd, throwError=False)
524
+ # If the ssh server uses dropbear
523
525
  if rc == 0:
524
526
  authKeysFile = SSH.DROPBEAR_AUTH_KEYS_FILE
527
+ else:
528
+ # Check for the users ssh config folder
529
+ cmd = "test -d %s" % (SSH.DEFAULT_REMOTE_SSH_CONFIG_FOLDER)
530
+ rc, stdoutLines, stderrLines = self.runCmd(cmd, throwError=False)
531
+ if rc != 0:
532
+ # If the remote ssh config folder does not exist, create it
533
+ cmd = f"mkdir {SSH.DEFAULT_REMOTE_SSH_CONFIG_FOLDER}"
534
+ rc, stdoutLines, stderrLines = self.runCmd(cmd, throwError=True)
525
535
 
526
536
  return authKeysFile
527
537
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p3lib
3
- Version: 1.1.71
3
+ Version: 1.1.73
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