kmisc 2.1.106__py3-none-any.whl → 2.1.108__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.
kmisc/__init__.py CHANGED
@@ -1603,12 +1603,20 @@ class EMAIL:
1603
1603
  if IsNone(self.user): self.user=sender
1604
1604
  try:
1605
1605
  server=smtplib.SMTP_SSL(self.server,self.port,context=context)
1606
+ except:
1607
+ print(f'Can not connect to {self.server}:{self.port}. If local server then please check the SMTP Server')
1608
+ return False
1609
+ try:
1606
1610
  server.login(self.user, self.password)
1607
1611
  except:
1608
1612
  print('Login fail at the server({})'.format(self.server))
1609
1613
  return False
1610
1614
  else:
1611
- server=smtplib.SMTP(self.server,self.port)
1615
+ try:
1616
+ server=smtplib.SMTP(self.server,self.port)
1617
+ except:
1618
+ print(f'Can not connect to {self.server}:{self.port}. If local server then please check the SMTP Server')
1619
+ return False
1612
1620
  if self.tls:
1613
1621
  if not self.password:
1614
1622
  print('It required mail server({}) login password'.format(self.server))
@@ -2091,21 +2099,6 @@ def Decompress(data,mode='lz4',work_path='/tmp',del_org_file=False,file_info={})
2091
2099
  if del_org_file: os.unline(data)
2092
2100
  return True
2093
2101
 
2094
- def ls(dirname,opt=''):
2095
- if not IsNone(dirname) and os.path.isdir(dirname):
2096
- dirlist=[]
2097
- dirinfo_a=list(os.walk(dirname))
2098
- if not IsNone(dirinfo_a):
2099
- dirinfo=dirinfo_a[0]
2100
- if opt == 'd':
2101
- dirlist=Get(dirinfo,1)
2102
- elif opt == 'f':
2103
- dirlist=Get(dirinfo,2)
2104
- else:
2105
- dirlist=Get(dirinfo,1)+Get(dirinfo,2)
2106
- return dirlist
2107
- return False
2108
-
2109
2102
  def append(src,addendum):
2110
2103
  type_src=type(src)
2111
2104
  type_data=type(addendum)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kmisc
3
- Version: 2.1.106
3
+ Version: 2.1.108
4
4
  Summary: Enginering useful library
5
5
  Home-page: https://github.com/kagepark/kmisc
6
6
  Author: Kage Park
@@ -0,0 +1,6 @@
1
+ kmisc/__init__.py,sha256=3_ljqkR1T2S_a6_v2bED--mlxg1NJ1DgEU6zPoIgpRU,135344
2
+ kmisc-2.1.108.dist-info/LICENSE,sha256=mn9ekhb34HJxsrVhcxrLXJUzy55T62zg-Gh9Ro0mVJI,1066
3
+ kmisc-2.1.108.dist-info/METADATA,sha256=v1QA1QqssS37IEcH86ICFBXEY8FMkInHewFqzKirgH4,5523
4
+ kmisc-2.1.108.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
5
+ kmisc-2.1.108.dist-info/top_level.txt,sha256=wvdHf5aQTqcGYvxk-F9E_BMWLMhlwC8INBmwO-V6_X4,6
6
+ kmisc-2.1.108.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- kmisc/__init__.py,sha256=nCG-0efYVOAbRFDLBf9gFJNBsHgBCUNuWK90iHpvyRc,135421
2
- kmisc-2.1.106.dist-info/LICENSE,sha256=mn9ekhb34HJxsrVhcxrLXJUzy55T62zg-Gh9Ro0mVJI,1066
3
- kmisc-2.1.106.dist-info/METADATA,sha256=oUA-IOysB1UAuzkkTcCLKgdzWthpae-3OnFvneMpB1A,5523
4
- kmisc-2.1.106.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
5
- kmisc-2.1.106.dist-info/top_level.txt,sha256=wvdHf5aQTqcGYvxk-F9E_BMWLMhlwC8INBmwO-V6_X4,6
6
- kmisc-2.1.106.dist-info/RECORD,,