ezKit 1.1.2__py3-none-any.whl → 1.1.4__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.
ezKit/utils.py CHANGED
@@ -1297,7 +1297,7 @@ def load_toml_file(file: str = None, debug: bool = False):
1297
1297
  return None
1298
1298
 
1299
1299
 
1300
- def git_clone(git_repository: str = None, local_repository: str = None, delete: bool = False, debug: bool = False) -> bool:
1300
+ def git_clone(git_repository: str = None, local_repository: str = None, timeout: int = 30, delete: bool = False, debug: bool = False) -> bool:
1301
1301
  try:
1302
1302
  info = 'Git克隆'
1303
1303
  # 获取应用程序Git仓库
@@ -1306,12 +1306,18 @@ def git_clone(git_repository: str = None, local_repository: str = None, delete:
1306
1306
  logger.info(f'[{info}]开始克隆')
1307
1307
  # 删除本地仓库
1308
1308
  delete_directory(local_repository) if v_true(delete, bool) else next
1309
- result = shell(f'git clone {git_repository} {local_repository}', universal_newlines=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
1309
+ result = shell(
1310
+ command=f'timeout -s 9 {timeout} git clone {git_repository} {local_repository}',
1311
+ universal_newlines=True,
1312
+ stderr=subprocess.PIPE,
1313
+ stdout=subprocess.PIPE
1314
+ )
1310
1315
  if result.returncode == 0:
1311
1316
  logger.success(f'[{info}]克隆成功')
1312
1317
  return True
1313
1318
  else:
1314
1319
  logger.error(f'[{info}]克隆失败')
1320
+ logger.error(result.stdout.splitlines()) if v_true(debug, bool) else next
1315
1321
  return False
1316
1322
  except Exception as e:
1317
1323
  logger.error(f'[{info}]克隆失败')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ezKit
3
- Version: 1.1.2
3
+ Version: 1.1.4
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -9,12 +9,12 @@ ezKit/plots.py,sha256=QUtoVfZ49ZSNcY8gcQ2TYVkMjDDzoW-myMtqTi5WN2U,5322
9
9
  ezKit/redis.py,sha256=pY4SPlcgQ7S8IeY2xoDpxy-xCZxzZQrQJNAoWRsC1dI,1773
10
10
  ezKit/reports.py,sha256=dBBggggCCLuk5YD6SjdUPuxTr3wiJojP3lA7dQfg6Pk,8898
11
11
  ezKit/sendemail.py,sha256=PItznLBcZ6Om8NU7rep69m3QNZ9YkmOovup7pPGyY58,4840
12
- ezKit/utils.py,sha256=59kM_fi8Bx3NakmXPjwdDtP51GFNbVAAs8u93Fd70s0,42102
12
+ ezKit/utils.py,sha256=v9IR7ACD_TGtFPiT1NU_jq-_BxkSUd9MDteOyf1ya_s,42296
13
13
  ezKit/weixin.py,sha256=Sxm_yNEvcztFNCZyjZetVwqxoGoL2PJHlQABIWkd1pk,5075
14
14
  ezKit/xftp.py,sha256=qbCqFcGe22TDBSisj0Zoz78tnydDWoOfvywWpXdfaGw,6982
15
15
  ezKit/zabbix.py,sha256=EF0-tQ1FTMBqawXKf3JEoPYoAJmYENXXIm9T5ICSdHM,32345
16
- ezKit-1.1.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
17
- ezKit-1.1.2.dist-info/METADATA,sha256=qUFiixoXP7NcXaWMpUPXpI7QHhfy8GRC-xWULNnlsOo,226
18
- ezKit-1.1.2.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
19
- ezKit-1.1.2.dist-info/top_level.txt,sha256=aYLB_1WODsqNTsTFWcKP-BN0KCTKcV-HZJ4zlHkCFw8,6
20
- ezKit-1.1.2.dist-info/RECORD,,
16
+ ezKit-1.1.4.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
17
+ ezKit-1.1.4.dist-info/METADATA,sha256=v6qLF4qn-zv--Z9FDV8fAHQf-JpV_qUSV-n4g2s8DNM,226
18
+ ezKit-1.1.4.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
19
+ ezKit-1.1.4.dist-info/top_level.txt,sha256=aYLB_1WODsqNTsTFWcKP-BN0KCTKcV-HZJ4zlHkCFw8,6
20
+ ezKit-1.1.4.dist-info/RECORD,,
File without changes
File without changes