kmisc 2.1.97__py3-none-any.whl → 2.1.99__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 +14 -7
- {kmisc-2.1.97.dist-info → kmisc-2.1.99.dist-info}/METADATA +1 -4
- kmisc-2.1.99.dist-info/RECORD +6 -0
- {kmisc-2.1.97.dist-info → kmisc-2.1.99.dist-info}/WHEEL +1 -1
- kmisc-2.1.97.dist-info/RECORD +0 -6
- {kmisc-2.1.97.dist-info → kmisc-2.1.99.dist-info}/LICENSE +0 -0
- {kmisc-2.1.97.dist-info → kmisc-2.1.99.dist-info}/top_level.txt +0 -0
kmisc/__init__.py
CHANGED
@@ -1545,6 +1545,10 @@ class EMAIL:
|
|
1545
1545
|
if not isinstance(receivers,list):
|
1546
1546
|
print('To mailing list issue')
|
1547
1547
|
return False
|
1548
|
+
if not filename:
|
1549
|
+
filename=[]
|
1550
|
+
elif not isinstance(filename,(list,tuple)):
|
1551
|
+
filename=[filename]
|
1548
1552
|
if filename:
|
1549
1553
|
_body=MIMEMultipart()
|
1550
1554
|
if isinstance(sender,tuple) and len(sender) == 2:
|
@@ -1562,12 +1566,15 @@ class EMAIL:
|
|
1562
1566
|
_body.attach(MIMEText(msg, "html"))
|
1563
1567
|
else:
|
1564
1568
|
_body.attach(MIMEText(msg, "plain"))
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1569
|
+
for fn in filename:
|
1570
|
+
if isinstance(fn,str) and os.path.isfile(fn):
|
1571
|
+
with open(fn,'rb') as attachment:
|
1572
|
+
part=MIMEBase("application", "octet-stream")
|
1573
|
+
part.set_payload(attachment.read())
|
1574
|
+
encoders.encode_base64(part)
|
1575
|
+
#part.add_header('Content-Disposition','attachment; filename="{}"'.format(os.path.basename(fn)))
|
1576
|
+
part.add_header('Content-Disposition','attachment',filename=('utf-8','',os.path.basename(fn)))
|
1577
|
+
_body.attach(part)
|
1571
1578
|
else:
|
1572
1579
|
if html:
|
1573
1580
|
_body=MIMEMultipart('alternative')
|
@@ -1690,7 +1697,7 @@ class SCREEN:
|
|
1690
1697
|
print('Already has the title at {}'.format(scr_id))
|
1691
1698
|
return False
|
1692
1699
|
|
1693
|
-
if not
|
1700
|
+
if not IpV4(ip,port=(623,664,443)):
|
1694
1701
|
print('{} is not ipmi ip'.format(ip))
|
1695
1702
|
return False
|
1696
1703
|
|
@@ -1,11 +1,10 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: kmisc
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.99
|
4
4
|
Summary: Enginering useful library
|
5
5
|
Home-page: https://github.com/kagepark/kmisc
|
6
6
|
Author: Kage Park
|
7
7
|
License: MIT
|
8
|
-
Platform: UNKNOWN
|
9
8
|
Classifier: Programming Language :: Python :: 2
|
10
9
|
Classifier: Programming Language :: Python :: 3
|
11
10
|
Classifier: License :: OSI Approved :: MIT License
|
@@ -266,5 +265,3 @@ ls : similar as linux ls command
|
|
266
265
|
IsSame: check both data is same or not
|
267
266
|
|
268
267
|
etc...
|
269
|
-
|
270
|
-
|
@@ -0,0 +1,6 @@
|
|
1
|
+
kmisc/__init__.py,sha256=RQrN-ILWI5hYbvcJbz82e8F4J_qYivogUIq7an9Db9o,133266
|
2
|
+
kmisc-2.1.99.dist-info/LICENSE,sha256=mn9ekhb34HJxsrVhcxrLXJUzy55T62zg-Gh9Ro0mVJI,1066
|
3
|
+
kmisc-2.1.99.dist-info/METADATA,sha256=6l-OSb4nx8zrw9juE_ncCGVZ5PAobxkUK6lUlZ9OxXI,5502
|
4
|
+
kmisc-2.1.99.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
5
|
+
kmisc-2.1.99.dist-info/top_level.txt,sha256=wvdHf5aQTqcGYvxk-F9E_BMWLMhlwC8INBmwO-V6_X4,6
|
6
|
+
kmisc-2.1.99.dist-info/RECORD,,
|
kmisc-2.1.97.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
kmisc/__init__.py,sha256=7MOoRMJfyOkhMeu0dLrLFLNyZNdcNG6QSpci01NGJD0,132876
|
2
|
-
kmisc-2.1.97.dist-info/LICENSE,sha256=mn9ekhb34HJxsrVhcxrLXJUzy55T62zg-Gh9Ro0mVJI,1066
|
3
|
-
kmisc-2.1.97.dist-info/METADATA,sha256=Sjc-IMnOZbIQvt_2j5tgINwilBi1mja5Q8vl3kv7jzQ,5522
|
4
|
-
kmisc-2.1.97.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
5
|
-
kmisc-2.1.97.dist-info/top_level.txt,sha256=wvdHf5aQTqcGYvxk-F9E_BMWLMhlwC8INBmwO-V6_X4,6
|
6
|
-
kmisc-2.1.97.dist-info/RECORD,,
|
File without changes
|
File without changes
|