ScriptCollection 4.2.48__py3-none-any.whl → 4.2.49__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.
@@ -35,7 +35,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
35
35
  from .ProgramRunnerPopen import ProgramRunnerPopen
36
36
  from .SCLog import SCLog, LogLevel
37
37
 
38
- version = "4.2.48"
38
+ version = "4.2.49"
39
39
  __version__ = version
40
40
 
41
41
  class VSCodeWorkspaceShellTask:
@@ -2084,12 +2084,17 @@ class ScriptCollectionCore:
2084
2084
  stderr: str
2085
2085
  pid: int
2086
2086
 
2087
+ @GeneralUtilities.check_arguments
2088
+ def run_with_epew_with_retry(self, program: str, argument: str = "", working_directory: str = None, print_errors_as_information: bool = False, log_file: str = None, timeoutInSeconds: int = 600, addLogOverhead: bool = False, title: str = None, log_namespace: str = "", arguments_for_log: str =None, throw_exception_if_exitcode_is_not_zero: bool = True, custom_argument: object = None, interactive: bool = False,print_live_output:bool=False,encode_argument_in_base64:bool=False, amount_of_attempts: int = 3, delay_in_seconds: int = 2) -> tuple[int, str, str, int]:
2089
+ return GeneralUtilities.retry_action(lambda: self.run_with_epew(program, argument, working_directory, print_errors_as_information, log_file, timeoutInSeconds, addLogOverhead, title, log_namespace,arguments_for_log, throw_exception_if_exitcode_is_not_zero, custom_argument, interactive, print_live_output,encode_argument_in_base64), amount_of_attempts, delay_in_seconds=delay_in_seconds)
2090
+
2087
2091
  @GeneralUtilities.check_arguments
2088
2092
  def run_with_epew(self, program: str, argument: str = "", working_directory: str = None, print_errors_as_information: bool = False, log_file: str = None, timeoutInSeconds: int = 600, addLogOverhead: bool = False, title: str = None, log_namespace: str = "", arguments_for_log: str =None, throw_exception_if_exitcode_is_not_zero: bool = True, custom_argument: object = None, interactive: bool = False,print_live_output:bool=False,encode_argument_in_base64:bool=False) -> tuple[int, str, str, int]:
2089
2093
  epew_argument:list[str]=["-p",program ,"-w", working_directory]
2090
2094
  if encode_argument_in_base64:
2091
2095
  if arguments_for_log is None:
2092
- arguments_for_log=epew_argument+["-a",f"\"{argument}\""]
2096
+ argument_escaped=argument.replace("\"", "\\\"")
2097
+ arguments_for_log=epew_argument+["-a",f"\"{argument_escaped}\""]
2093
2098
  base64_string = base64.b64encode(argument.encode("utf-8")).decode("utf-8")
2094
2099
  epew_argument=epew_argument+["-a",base64_string,"-b"]
2095
2100
  else:
@@ -425,7 +425,7 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
425
425
  if os.path.isfile(os.path.join(codeunit_folder, runsettings_file)):
426
426
  arg = f"{arg} --settings {runsettings_file}"
427
427
  arg = f"{arg} /p:CollectCoverage=true /p:CoverletOutput=../Other/Artifacts/TestCoverage/Testcoverage /p:CoverletOutputFormat=cobertura"
428
- self._protected_sc.run_program("dotnet", arg, codeunit_folder, print_live_output=self.get_verbosity()==LogLevel.Debug)
428
+ self._protected_sc.run_with_epew_with_retry("dotnet", arg, codeunit_folder, print_live_output=self.get_verbosity()==LogLevel.Debug,timeoutInSeconds=600*20)
429
429
  target_file = os.path.join(coverage_file_folder, "TestCoverage.xml")
430
430
  GeneralUtilities.ensure_file_does_not_exist(target_file)
431
431
  os.rename(os.path.join(coverage_file_folder, "Testcoverage.cobertura.xml"), target_file)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ScriptCollection
3
- Version: 4.2.48
3
+ Version: 4.2.49
4
4
  Summary: The ScriptCollection is the place for reusable scripts.
5
5
  Home-page: https://github.com/anionDev/ScriptCollection
6
6
  Author: Marius Göcke
@@ -10,7 +10,7 @@ ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrR
10
10
  ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
11
11
  ScriptCollection/ProgramRunnerSudo.py,sha256=_khC3xuTdrPoLluBJZWfldltmmuKltABJPcbjZSFW-4,4835
12
12
  ScriptCollection/SCLog.py,sha256=8TRy1LeYMsPOIuWUcnUNNbO5pd-cNBS-3cn-kdzP8FU,4768
13
- ScriptCollection/ScriptCollectionCore.py,sha256=cvIPzpOUywZ5wKALwULgLdmL45z6wp04W9s2ky9gEms,165328
13
+ ScriptCollection/ScriptCollectionCore.py,sha256=tnlW-aeOp6Lmj0Gl8p0T1QecxvZ8QhAURO-kfGqh_Rk,166402
14
14
  ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=Pa72cRybzBroy-OzzxZqKpFB58iY2kcf5yFfIAIPfXk,1627
16
16
  ScriptCollection/OCIImages/OCIImageManager.py,sha256=xTYnj68CRDkTjJiibSov1HSI0djmmcY6mwP6_fD0kCM,7141
@@ -38,7 +38,7 @@ ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
38
38
  ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationBase.py,sha256=bT6Gd5pQpZCw4OQz6HWkPCSn5z__eUUEisABLDSxd0o,200
39
39
  ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationGenerate.py,sha256=QyjOfMY22JWCvKjMelHiDWbJiWqotOfebpJpgDUaoO4,237
40
40
  ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationNoGenerate.py,sha256=i0zEGehj0sttxjjZtoq2KFSKp_ulxVyWp_ZgAhIY_So,241
41
- ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=0_IRUZE9YzIpSKaj-JRXjHS1pshqYSICNKLXzVbYK_w,31958
41
+ ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=PktP8GpAYvpeU7ipXljHC-Ej9T2imcCxg6o0Huak7EA,31995
42
42
  ScriptCollection/TFCPS/DotNet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=U8oBAOLR2vJpVfc9631Rhb8a04nrnjUMMX-U7pvXjok,7342
44
44
  ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -48,8 +48,8 @@ ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py,sha256=wKB5t-K7p3
48
48
  ScriptCollection/TFCPS/NodeJS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
49
  ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=nLw_eSUd_56jjgfcAvtUyzecSZ14mYmNJl0iu-1YNVk,13496
50
50
  ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
- scriptcollection-4.2.48.dist-info/METADATA,sha256=ACVmg4P5OfHT_nYs7aaw_OWmON4bYNqF9SvKrBqxXa8,7690
52
- scriptcollection-4.2.48.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
53
- scriptcollection-4.2.48.dist-info/entry_points.txt,sha256=FUA-dAZQISQRwFDJvo-tVVTVE0vrH0f0VR9XckeRvv0,4621
54
- scriptcollection-4.2.48.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
55
- scriptcollection-4.2.48.dist-info/RECORD,,
51
+ scriptcollection-4.2.49.dist-info/METADATA,sha256=c1kK2xjAzlsD8tC8lJ67ut2E0wmuTM-oNfSIVgtrt7s,7690
52
+ scriptcollection-4.2.49.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
53
+ scriptcollection-4.2.49.dist-info/entry_points.txt,sha256=FUA-dAZQISQRwFDJvo-tVVTVE0vrH0f0VR9XckeRvv0,4621
54
+ scriptcollection-4.2.49.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
55
+ scriptcollection-4.2.49.dist-info/RECORD,,