diff options
author | Holger Weiß <holger@zedat.fu-berlin.de> | 2011-06-29 19:12:23 +0200 |
---|---|---|
committer | Holger Weiß <holger@zedat.fu-berlin.de> | 2011-06-29 19:12:23 +0200 |
commit | b263182adabe4a1fff32ed3a1ef765b5e9a68f67 (patch) | |
tree | 7990d0ada8799b274f9a692ec9fb4d51ee211c57 /src/lib/Server/Reports/importscript.py | |
parent | a702a5ee53ae8cb5870844237fe88c55dac97734 (diff) | |
download | bcfg2-b263182adabe4a1fff32ed3a1ef765b5e9a68f67.tar.gz bcfg2-b263182adabe4a1fff32ed3a1ef765b5e9a68f67.tar.bz2 bcfg2-b263182adabe4a1fff32ed3a1ef765b5e9a68f67.zip |
New database field: "is_sensitive"
The new "entry.reason.is_sensitive" flag indicates whether the file
contents/diffs were omitted from the database due to the "sensitive"
<Path> attribute.
Diffstat (limited to 'src/lib/Server/Reports/importscript.py')
-rwxr-xr-x | src/lib/Server/Reports/importscript.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/Server/Reports/importscript.py b/src/lib/Server/Reports/importscript.py index 68774cec6..7dfac6fae 100755 --- a/src/lib/Server/Reports/importscript.py +++ b/src/lib/Server/Reports/importscript.py @@ -40,7 +40,11 @@ from Bcfg2.Bcfg2Py3k import ConfigParser def build_reason_kwargs(r_ent, encoding, logger): binary_file = False - if r_ent.get('current_bfile', False): + sensitive_file = False + if r_ent.get('sensitive') in ['true', 'True']: + sensitive_file = True + rc_diff = '' + elif r_ent.get('current_bfile', False): binary_file = True rc_diff = r_ent.get('current_bfile') if len(rc_diff) > 1024 * 1024: @@ -74,7 +78,8 @@ def build_reason_kwargs(r_ent, encoding, logger): current_version=r_ent.get('current_version', default=""), current_exists=r_ent.get('current_exists', default="True").capitalize() == "True", current_diff=rc_diff, - is_binary=binary_file) + is_binary=binary_file, + is_sensitive=sensitive_file) def load_stats(cdata, sdata, encoding, vlevel, logger, quick=False, location=''): |