atomicshop 3.2.11__py3-none-any.whl → 3.2.13__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 CHANGED
@@ -1,4 +1,4 @@
1
1
  """Atomic Basic functions and classes to make developer life easier"""
2
2
 
3
3
  __author__ = "Den Kras"
4
- __version__ = '3.2.11'
4
+ __version__ = '3.2.13'
@@ -66,7 +66,7 @@ def install_docker_ubuntu(
66
66
  use_docker_installer: bool = True,
67
67
  rootless: bool = False,
68
68
  add_current_user_to_docker_group_bool: bool = False
69
- ):
69
+ ) -> int:
70
70
  """
71
71
  The function will install docker on ubuntu.
72
72
  Note: If you want to install docker in rootless mode, you need to run the script without sudo.
@@ -81,15 +81,17 @@ def install_docker_ubuntu(
81
81
  this is not needed.
82
82
 
83
83
  Usage in main.py (run with sudo):
84
+ import sys
84
85
  from atomicshop.wrappers.dockerw import install_docker
85
86
 
86
87
 
87
88
  def main():
88
- install_docker.install_docker_ubuntu()
89
+ execution_result: int = install_docker.install_docker_ubuntu()
90
+ return execution_result
89
91
 
90
92
 
91
93
  if __name__ == '__main__':
92
- main()
94
+ sys.exit(main())
93
95
  """
94
96
 
95
97
  if rootless and permissions.is_admin():
@@ -203,8 +205,8 @@ def install_docker_ubuntu(
203
205
 
204
206
  if 'Hello from Docker!' in '\n'.join(result):
205
207
  print_api('Docker installed successfully.', color='green')
206
- return True
208
+ return 0
207
209
  else:
208
210
  print_api('Docker installation failed.', color='red')
209
211
  print_api('Please check the logs above for more information.', color='red')
210
- return False
212
+ return 1
@@ -17,7 +17,7 @@ def install_before_restart(
17
17
  fact_source_archive_path: str = None,
18
18
  use_built_in_fact_installer: bool = True,
19
19
  print_kwargs: dict = None
20
- ):
20
+ ) -> int:
21
21
  """
22
22
  This function will install the FACT_core before the restart of the computer.
23
23
  :param installation_directory: string, the directory to install the FACT_core to.
@@ -35,12 +35,12 @@ def install_before_restart(
35
35
  If False, only the regular prerequisites will be installed, while the user will need to install DOCKER
36
36
  and Node.js separately.
37
37
  :param print_kwargs: dict, the print kwargs for the print_api function.
38
- :return:
38
+ :return: int, 0 if the installation was successful, 1 if there was an error.
39
39
  """
40
40
 
41
41
  # if not permissions.is_admin():
42
42
  # print_api("This script requires root privileges...", color='red')
43
- # sys.exit(1)
43
+ # return 1
44
44
 
45
45
  # # Install docker in rootless mode.
46
46
  # with ubuntu_permissions.temporary_regular_permissions():
@@ -89,7 +89,7 @@ def install_before_restart(
89
89
  # the user permissions to the docker group before restart.
90
90
  if not install_docker.add_current_user_to_docker_group():
91
91
  print_api("Docker is installed, but the current user was not added to the docker group.", color='red')
92
- sys.exit(1)
92
+ return 1
93
93
  else:
94
94
  message = ("You will need to install DOCKER and NODEJS separately.\n"
95
95
  "This was done to enable Rootless docker install and install other version of NodeJS.")
@@ -108,8 +108,13 @@ def install_before_restart(
108
108
  # use_docker_installer=True, rootless=True, add_current_user_to_docker_group_bool=False)
109
109
 
110
110
  # Install docker in regular mode.
111
- install_docker.install_docker_ubuntu(
111
+ result: int = install_docker.install_docker_ubuntu(
112
112
  use_docker_installer=True, rootless=False, add_current_user_to_docker_group_bool=True)
113
+ if result != 0:
114
+ print_api("Docker installation failed. Please install Docker manually.", color='red')
115
+ return result
113
116
 
114
117
  print_api("FACT_core installation before restart is finished.", color='green')
115
118
  print_api("Please restart the computer to continue the installation.", color='red')
119
+
120
+ return 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 3.2.11
3
+ Version: 3.2.13
4
4
  Summary: Atomic functions and classes to make developer life easier
5
5
  Author: Denis Kras
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- atomicshop/__init__.py,sha256=uAe2_I-bgd4PsVkPLa-ANJSdckjZL2cytN_g3gJV6m8,123
1
+ atomicshop/__init__.py,sha256=UYDi1DtFvpmGJ2kxBvAeb_fCaEUk-YIU60Fc_p2ADWM,123
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
@@ -225,7 +225,7 @@ atomicshop/wrappers/ctyping/msi_windows_installer/extract_msi_main.py,sha256=AEk
225
225
  atomicshop/wrappers/ctyping/msi_windows_installer/tables.py,sha256=tHsu0YfBgzuIk9L-PyqLgU_IzyVbCfy8L1EqelNnvWk,17674
226
226
  atomicshop/wrappers/dockerw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
227
227
  atomicshop/wrappers/dockerw/dockerw.py,sha256=GgPSvXxJj15kZ-LPiaHLl8aekof53sSP_U-vUMUe7_8,10639
228
- atomicshop/wrappers/dockerw/install_docker.py,sha256=7NTMxCPBesr0QcqB0RZ5YU0I8FDPtNux_mYAX28wI0I,9982
228
+ atomicshop/wrappers/dockerw/install_docker.py,sha256=CeDlxWuOn_bRUhHEnvpgVGGYZgP7B-Q9qNMkDfFiV2E,10073
229
229
  atomicshop/wrappers/elasticsearchw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
230
  atomicshop/wrappers/elasticsearchw/config_basic.py,sha256=fDujtrjEjbWiYh_WQ3OcYp_8mXhXPYeKLy4wSPL5qM0,1177
231
231
  atomicshop/wrappers/elasticsearchw/elastic_infra.py,sha256=at0sD-SFtmEvfGyIU_YBEKoU-MNeVtDQSNscPm0JWLc,10368
@@ -248,7 +248,7 @@ atomicshop/wrappers/factw/fact_extractor/docker_image.py,sha256=2FyYjnw8gxFNwISQ
248
248
  atomicshop/wrappers/factw/fact_extractor/get_extractor.py,sha256=2mfOAftHIlCcGt1s7MWdq7DsDCuI6wX3MtvcEZ4SK-0,756
249
249
  atomicshop/wrappers/factw/install/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
250
250
  atomicshop/wrappers/factw/install/install_after_restart.py,sha256=4dHn2XMbYaPJlhRCmZqqwsgHQBlG2mT7aW50pQCPtp4,4345
251
- atomicshop/wrappers/factw/install/pre_install_and_install_before_restart.py,sha256=GFsO9MTH0czKoxkiPJtjalilUwsmFLBCcx9Znv37S4M,5945
251
+ atomicshop/wrappers/factw/install/pre_install_and_install_before_restart.py,sha256=Xnb1-NGAR-jjzfgkSbJ8JTkGNWb9R4-N36zsLO245n0,6193
252
252
  atomicshop/wrappers/factw/postgresql/__init__.py,sha256=xMBn2d3Exo23IPP2F_9-SXmOlhFbwWDgS9KwozSTjA0,162
253
253
  atomicshop/wrappers/factw/postgresql/analysis.py,sha256=2Rxzy2jyq3zEKIo53z8VkjuslKE_i5mq2ZpmJAvyd6U,716
254
254
  atomicshop/wrappers/factw/postgresql/file_object.py,sha256=VRiCXnsd6yDbnsE-TEKYPC-gkAgFVkE6rygRrJLQShI,713
@@ -337,9 +337,9 @@ atomicshop/wrappers/socketw/statistics_csv.py,sha256=WcNyaqEZ82S5-f3kzqi1nllNT2N
337
337
  atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
338
338
  atomicshop/wrappers/winregw/winreg_installed_software.py,sha256=Qzmyktvob1qp6Tjk2DjLfAqr_yXV0sgWzdMW_9kwNjY,2345
339
339
  atomicshop/wrappers/winregw/winreg_network.py,sha256=ih0BVNwByLvf9F_Lac4EdmDYYJA3PzMvmG0PieDZrsE,9905
340
- atomicshop-3.2.11.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
341
- atomicshop-3.2.11.dist-info/METADATA,sha256=5C3bLgLQeg8N_xL7RpKGTnOSU8CEi9MIgciC5B6sXNE,10603
342
- atomicshop-3.2.11.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
343
- atomicshop-3.2.11.dist-info/entry_points.txt,sha256=SJEgEP0KoFtfxuGwe5tOzKfXkjR9Dv6YYug33KNYxyY,69
344
- atomicshop-3.2.11.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
345
- atomicshop-3.2.11.dist-info/RECORD,,
340
+ atomicshop-3.2.13.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
341
+ atomicshop-3.2.13.dist-info/METADATA,sha256=UbWeoDTbsuOu-nLT0S9r-d0xSWAFC0tnx4iPrPP-SHU,10603
342
+ atomicshop-3.2.13.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
343
+ atomicshop-3.2.13.dist-info/entry_points.txt,sha256=SJEgEP0KoFtfxuGwe5tOzKfXkjR9Dv6YYug33KNYxyY,69
344
+ atomicshop-3.2.13.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
345
+ atomicshop-3.2.13.dist-info/RECORD,,