p3lib 1.1.71__py3-none-any.whl → 1.1.73__py3-none-any.whl

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/database_if.py CHANGED
@@ -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,\
p3lib/ssh.py CHANGED
@@ -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
@@ -12,8 +12,8 @@ Classifier: Operating System :: OS Independent
12
12
  Requires-Python: >=3.8
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
- Requires-Dist: paramiko >=2.9.3
16
- Requires-Dist: pillow >=9.2.0
15
+ Requires-Dist: paramiko>=2.9.3
16
+ Requires-Dist: pillow>=9.2.0
17
17
 
18
18
  # A Python3 library
19
19
  A group of python modules for networking, plotting data, config storage, automating boot scripts, ssh access and user input output.
@@ -4,18 +4,18 @@ p3lib/bokeh_auth.py,sha256=XqdCLOalHL3dkyrMPqQoVQBSziVnqlfjB9YAWhZUd_U,14769
4
4
  p3lib/bokeh_gui.py,sha256=MNapLctSncZ9YyKGzNcUICMwpI5_h7a7bH3QdMd2UxI,40393
5
5
  p3lib/boot_manager.py,sha256=-kbfYbFpO-ktKv_heUgYdvvIQrntfCQ7pBcPWqS3C0s,12551
6
6
  p3lib/conduit.py,sha256=jPkjdtyCx2I6SFqcEo8y2g7rgnZ-jNY7oCuYIETzT5Q,6046
7
- p3lib/database_if.py,sha256=mgTdSeCTQs1V10E7KuyK3xRkdaU3RXrqYpMQvosrA_M,11897
7
+ p3lib/database_if.py,sha256=XKu1w3zftGbj4Rh54wrWJnoCtqHkhCzJUPN2S70XIKg,11915
8
8
  p3lib/helper.py,sha256=-B63_ncfchMwXrvyVcnj9sxwGnMJ3ASmLmpoYa4tBmM,11862
9
9
  p3lib/json_networking.py,sha256=6u4s1SmypjTYPnSxHP712OgQ3ZJaxOqIkgHQ1J7Qews,9738
10
10
  p3lib/mqtt_rpc.py,sha256=6LmFA1kR4HSJs9eWbOJORRHNY01L_lHWjvtE2fmY8P8,10511
11
11
  p3lib/netif.py,sha256=3QV5OGdHhELIf4MBj6mx5MNCtVeZ7JXoNEkeu4KzCaE,9796
12
12
  p3lib/netplotly.py,sha256=PMDx-w1jtRVW6Od5u_kuKbBxNpTS_Y88mMF60puMxLM,9363
13
13
  p3lib/pconfig.py,sha256=_ri9w3aauHXZp8u2YLYHBVroFR_iCqaTCwj_MRa3rHo,30153
14
- p3lib/ssh.py,sha256=-w_2oQWZaIABanF1lk8fRyMLkJK231Bvy11StgdYqJg,38951
14
+ p3lib/ssh.py,sha256=JiO9MY98zf3uqbonygJi_F9X0eAAgHAINCTeBuYXpCY,39511
15
15
  p3lib/table_plot.py,sha256=dRPZ9rFpwE9Dpyqrvbm5t2spVaPSHrx_B7KvfWVND3g,32166
16
16
  p3lib/uio.py,sha256=hMarPnYXnqVF23HUIeDfzREo7TMdBjrupXMY_ffuCbI,23133
17
- p3lib-1.1.71.dist-info/LICENSE,sha256=igqTy5u0kVWM1n-NUZMvAlinY6lVjAXKoag0okkS8V8,1067
18
- p3lib-1.1.71.dist-info/METADATA,sha256=brK06I1P_AVSTY4bFV2VGf9J8flUWVrK6ycf18_22VM,920
19
- p3lib-1.1.71.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
20
- p3lib-1.1.71.dist-info/top_level.txt,sha256=SDCpXYh-19yCFp4Z8ZK4B-3J4NvTCJElZ42NPgcR6-U,6
21
- p3lib-1.1.71.dist-info/RECORD,,
17
+ p3lib-1.1.73.dist-info/LICENSE,sha256=igqTy5u0kVWM1n-NUZMvAlinY6lVjAXKoag0okkS8V8,1067
18
+ p3lib-1.1.73.dist-info/METADATA,sha256=W0G4eAqz_wdHdICMxWEQQoGsvonKdTIvZ5k8VuP7J6U,918
19
+ p3lib-1.1.73.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
20
+ p3lib-1.1.73.dist-info/top_level.txt,sha256=SDCpXYh-19yCFp4Z8ZK4B-3J4NvTCJElZ42NPgcR6-U,6
21
+ p3lib-1.1.73.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (74.1.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5