kmisc 2.1.106__tar.gz → 2.1.108__tar.gz
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-2.1.106 → kmisc-2.1.108}/PKG-INFO +1 -1
- {kmisc-2.1.106 → kmisc-2.1.108}/kmisc/__init__.py +9 -16
- {kmisc-2.1.106 → kmisc-2.1.108}/kmisc.egg-info/PKG-INFO +1 -1
- {kmisc-2.1.106 → kmisc-2.1.108}/LICENSE +0 -0
- {kmisc-2.1.106 → kmisc-2.1.108}/README.md +0 -0
- {kmisc-2.1.106 → kmisc-2.1.108}/kmisc.egg-info/SOURCES.txt +0 -0
- {kmisc-2.1.106 → kmisc-2.1.108}/kmisc.egg-info/dependency_links.txt +0 -0
- {kmisc-2.1.106 → kmisc-2.1.108}/kmisc.egg-info/top_level.txt +0 -0
- {kmisc-2.1.106 → kmisc-2.1.108}/pyproject.toml +0 -0
- {kmisc-2.1.106 → kmisc-2.1.108}/setup.cfg +0 -0
- {kmisc-2.1.106 → kmisc-2.1.108}/setup.py +0 -0
@@ -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
|
-
|
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)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|