atomicshop 2.11.22__py3-none-any.whl → 2.11.23__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.
Potentially problematic release.
This version of atomicshop might be problematic. Click here for more details.
- atomicshop/__init__.py +1 -1
- atomicshop/wrappers/ubuntu_terminal.py +8 -2
- {atomicshop-2.11.22.dist-info → atomicshop-2.11.23.dist-info}/METADATA +1 -1
- {atomicshop-2.11.22.dist-info → atomicshop-2.11.23.dist-info}/RECORD +7 -7
- {atomicshop-2.11.22.dist-info → atomicshop-2.11.23.dist-info}/LICENSE.txt +0 -0
- {atomicshop-2.11.22.dist-info → atomicshop-2.11.23.dist-info}/WHEEL +0 -0
- {atomicshop-2.11.22.dist-info → atomicshop-2.11.23.dist-info}/top_level.txt +0 -0
atomicshop/__init__.py
CHANGED
|
@@ -228,11 +228,15 @@ def add_path_to_bashrc(as_regular_user: bool = False):
|
|
|
228
228
|
print("$HOME/bin already in .bashrc")
|
|
229
229
|
|
|
230
230
|
|
|
231
|
-
def get_command_execution_as_sudo_executer(command: str) -> str:
|
|
231
|
+
def get_command_execution_as_sudo_executer(command: str, add_bash_exec: bool = False) -> str:
|
|
232
232
|
"""
|
|
233
233
|
Function gets the command execution as the sudo executer.
|
|
234
234
|
The input command should be without 'sudo', if it will be, it will be omitted.
|
|
235
235
|
:param command: str, the command to execute.
|
|
236
|
+
:param add_bash_exec: bool, if True, the command will be executed with bash.
|
|
237
|
+
Example command: 'systemctl --user start docker.service'
|
|
238
|
+
Example command with add_bash_exec: 'su <sudo_executioner_user> -c "/bin/bash systemctl --user start docker.service"'
|
|
239
|
+
Example command without add_bash_exec: 'su <sudo_executioner_user> -c "systemctl --user start docker.service"'
|
|
236
240
|
:return: str, the command execution as the sudo executer.
|
|
237
241
|
"""
|
|
238
242
|
|
|
@@ -245,6 +249,8 @@ def get_command_execution_as_sudo_executer(command: str) -> str:
|
|
|
245
249
|
sudo_executer_username: str = permissions.get_ubuntu_sudo_executer_username()
|
|
246
250
|
|
|
247
251
|
if sudo_executer_username:
|
|
248
|
-
|
|
252
|
+
if add_bash_exec:
|
|
253
|
+
command = f'/bin/bash {command}'
|
|
254
|
+
return f'su {sudo_executer_username} -c "{command}"'
|
|
249
255
|
else:
|
|
250
256
|
return command
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
atomicshop/__init__.py,sha256=
|
|
1
|
+
atomicshop/__init__.py,sha256=eLGGiGh8YjeuV7Rdm9URixwIH2cBlzqu1rC9g8rTfT0,124
|
|
2
2
|
atomicshop/_basics_temp.py,sha256=6cu2dd6r2dLrd1BRNcVDKTHlsHs_26Gpw8QS6v32lQ0,3699
|
|
3
3
|
atomicshop/_create_pdf_demo.py,sha256=Yi-PGZuMg0RKvQmLqVeLIZYadqEZwUm-4A9JxBl_vYA,3713
|
|
4
4
|
atomicshop/_patch_import.py,sha256=ENp55sKVJ0e6-4lBvZnpz9PQCt3Otbur7F6aXDlyje4,6334
|
|
@@ -151,7 +151,7 @@ atomicshop/wrappers/olefilew.py,sha256=biD5m58rogifCYmYhJBrAFb9O_Bn_spLek_9HofLe
|
|
|
151
151
|
atomicshop/wrappers/pipw.py,sha256=iq4pDhmrHqKbcRi3Y6_v2PQSdb4fqfAx79rsX7JEmXo,801
|
|
152
152
|
atomicshop/wrappers/process_wrapper_pbtk.py,sha256=ycPmBRnv627RWks6N8OhxJQe8Gu3h3Vwj-4HswPOw0k,599
|
|
153
153
|
atomicshop/wrappers/pyopensslw.py,sha256=OBWxA6EJ2vU_Qlf4M8m6ilcG3hyYB4yB0EsXUf7NhEU,6804
|
|
154
|
-
atomicshop/wrappers/ubuntu_terminal.py,sha256=
|
|
154
|
+
atomicshop/wrappers/ubuntu_terminal.py,sha256=J_AI4hBTMVetSTCG_L4ZcXY0wqGei2TXFZU4WCcdHaA,8811
|
|
155
155
|
atomicshop/wrappers/wslw.py,sha256=AKphiHLSddL7ErevUowr3f9Y1AgGz_R3KZ3NssW07h8,6959
|
|
156
156
|
atomicshop/wrappers/certauthw/certauth.py,sha256=hKedW0DOWlEigSNm8wu4SqHkCQsGJ1tJfH7s4nr3Bk0,12223
|
|
157
157
|
atomicshop/wrappers/certauthw/certauthw.py,sha256=4WvhjANI7Kzqrr_nKmtA8Kf7B6rute_5wfP65gwQrjw,8082
|
|
@@ -242,8 +242,8 @@ atomicshop/wrappers/socketw/socket_server_tester.py,sha256=AhpurHJmP2kgzHaUbq5ey
|
|
|
242
242
|
atomicshop/wrappers/socketw/socket_wrapper.py,sha256=aXBwlEIJhFT0-c4i8iNlFx2It9VpCEpsv--5Oqcpxao,11624
|
|
243
243
|
atomicshop/wrappers/socketw/ssl_base.py,sha256=k4V3gwkbq10MvOH4btU4onLX2GNOsSfUAdcHmL1rpVE,2274
|
|
244
244
|
atomicshop/wrappers/socketw/statistics_csv.py,sha256=t3dtDEfN47CfYVi0CW6Kc2QHTEeZVyYhc57IYYh5nmA,826
|
|
245
|
-
atomicshop-2.11.
|
|
246
|
-
atomicshop-2.11.
|
|
247
|
-
atomicshop-2.11.
|
|
248
|
-
atomicshop-2.11.
|
|
249
|
-
atomicshop-2.11.
|
|
245
|
+
atomicshop-2.11.23.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
|
|
246
|
+
atomicshop-2.11.23.dist-info/METADATA,sha256=2LOr485GmQvZzmI8zezZ7n0AcxYerhyMxBb5_gLDiSA,10448
|
|
247
|
+
atomicshop-2.11.23.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
248
|
+
atomicshop-2.11.23.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
|
|
249
|
+
atomicshop-2.11.23.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|