Module: check_mk
Branch: master
Commit: 44449c2dfb69479f46c95510fa50ae1a1245efcc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=44449c2dfb6947…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 9 12:06:36 2017 +0200
5390 FIX MKP: Ignore *.pyc files when creating MKP packages
Packing the compiled pyc files into MKP packages is not a good idea,
because they are python version specific and can be created by the
target system at any time. So better ignore these files when creating
packages.
Change-Id: Ie7bf289e711dd4c6eaf38618d0fc49266560f665
---
.werks/5390 | 13 +++++++++++++
cmk_base/packaging.py | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/5390 b/.werks/5390
new file mode 100644
index 0000000..c0fc01d
--- /dev/null
+++ b/.werks/5390
@@ -0,0 +1,13 @@
+Title: MKP: Ignore *.pyc files when creating MKP packages
+Level: 1
+Component: core
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1507543532
+Class: fix
+
+Packing the compiled pyc files into MKP packages is not a good idea,
+because they are python version specific and can be created by the
+target system at any time. So better ignore these files when creating
+packages.
diff --git a/cmk_base/packaging.py b/cmk_base/packaging.py
index 60e1b08..5ffc0f0 100644
--- a/cmk_base/packaging.py
+++ b/cmk_base/packaging.py
@@ -591,7 +591,7 @@ def files_in_dir(part, dir, prefix = ""):
result = []
files = os.listdir(dir)
for f in files:
- if f in [ '.', '..' ] or f.startswith('.') or
f.endswith('~'):
+ if f in [ '.', '..' ] or f.startswith('.') or
f.endswith('~') or f.endswith(".pyc"):
continue
ignored = package_ignored_files.get(part, [])