kkpyutil 1.36.1__py3-none-any.whl → 1.36.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kkpyutil
3
- Version: 1.36.1
3
+ Version: 1.36.3
4
4
  Summary: Building blocks for sysadmin and DevOps
5
5
  Home-page: https://github.com/kakyoism/kkpyutil/
6
6
  License: MIT
@@ -0,0 +1,7 @@
1
+ kkpyutil.py,sha256=oImW-f1e1EINwHSkoW8NkGPbVVCr5rsZAvJmBoDCU1I,108149
2
+ kkpyutil_helper/windows/kkttssave.ps1,sha256=xa3-WzqNh2rGYlOx_I4ewOuCE94gkTO5cEwYH0M67_0,446
3
+ kkpyutil_helper/windows/kkttsspeak.ps1,sha256=7WUUHMmjTQroUWA2Mvdt4JtSt475nZUHQx-qP-7rS6o,305
4
+ kkpyutil-1.36.3.dist-info/LICENSE,sha256=uISevGnCxB5QOU0ftbofN75_yUtd6E2h_MWE1zqagC8,1065
5
+ kkpyutil-1.36.3.dist-info/METADATA,sha256=JH4Dp5DbGimNbljX3GUYO8uNr9MzQPsb_7_qJ53TZ64,1136
6
+ kkpyutil-1.36.3.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
7
+ kkpyutil-1.36.3.dist-info/RECORD,,
kkpyutil.py CHANGED
@@ -319,7 +319,10 @@ def format_xml(elem, indent=' ', encoding='utf-8'):
319
319
  from xml.dom import minidom
320
320
  rough_string = ET.tostring(elem, encoding)
321
321
  reparsed = minidom.parseString(rough_string)
322
- return reparsed.toprettyxml(indent=indent, encoding=encoding).decode(encoding)
322
+ raw = reparsed.toprettyxml(indent=indent, encoding=encoding).decode(encoding)
323
+ lines = raw.split('\n')
324
+ non_empty_lines = [line for line in lines if line.strip() != '']
325
+ return '\n'.join(non_empty_lines)
323
326
 
324
327
 
325
328
  def throw(err_cls, detail, advice):
@@ -1,7 +0,0 @@
1
- kkpyutil.py,sha256=jf4fMkntbTIYsCYR8A7zgKPMP4rxvHywOg5azfD_MMU,108015
2
- kkpyutil_helper/windows/kkttssave.ps1,sha256=xa3-WzqNh2rGYlOx_I4ewOuCE94gkTO5cEwYH0M67_0,446
3
- kkpyutil_helper/windows/kkttsspeak.ps1,sha256=7WUUHMmjTQroUWA2Mvdt4JtSt475nZUHQx-qP-7rS6o,305
4
- kkpyutil-1.36.1.dist-info/LICENSE,sha256=uISevGnCxB5QOU0ftbofN75_yUtd6E2h_MWE1zqagC8,1065
5
- kkpyutil-1.36.1.dist-info/METADATA,sha256=6t-NEg4xPUCu3682LSBpeyo00mVGc2q6NL3Hl_WInWA,1136
6
- kkpyutil-1.36.1.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
7
- kkpyutil-1.36.1.dist-info/RECORD,,