Bug #6615
closed
ncf_rudder.py is not valid when using python 2.6
Added by Nicolas CHARLES over 9 years ago.
Updated over 2 years ago.
Description
When saving a technique, I get the following error
An Error occured! Could not write technique 'dsqfqsf' from path /var/rudder/configuration-repository/ncf, cause is: Error while running post-hook command [u'/var/rudder/configuration-repository/ncf/ncf-hooks.d/post.write_technique.rudderify.sh', u'/var/rudder/configuration-repository/ncf', u'dsqfqsf']
Details: INFO: Alternative source path added: /var/rudder/configuration-repository/ncf Error: Unable to create Rudder Technique files related to ncf Technique dsqfqsf (sub() got an unexpected keyword argument 'flags') Traceback (most recent call last): File "/usr/share/ncf/tools/ncf_rudder.py", line 46, in write_one_technique_for_rudder write_technique_for_rudder(destination_path, metadata) File "/usr/share/ncf/tools/ncf_rudder.py", line 125, in write_technique_for_rudder write_rudder_reporting_file(path,technique) File "/usr/share/ncf/tools/ncf_rudder.py", line 147, in write_rudder_reporting_file content = generate_rudder_reporting(technique) File "/usr/share/ncf/tools/ncf_rudder.py", line 302, in generate_rudder_reporting key_value_canonified = re.sub("[^\$\{\}\w](?![^{}]+})|\$(?!{)", "_", key_value, flags=re.UNICODE) TypeError: sub() got an unexpected keyword argument 'flags'
- Project changed from Rudder to 41
- Category deleted (
Web - Technique editor)
- Target version changed from 2.11.12 to 0.x
Support for python 2.6 was not added on ncf_rudder.py
- Status changed from New to In progress
- Status changed from In progress to Pending technical review
- Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/ncf/pull/199
- Status changed from Pending technical review to In progress
- Assignee changed from Nicolas CHARLES to Vincent MEMBRÉ
this fix is not enough:
An Error occured! Could not write technique 'fdsgfdsgdsfg' from path /var/rudder/configuration-repository/ncf, cause is: Error while running post-hook command [u'/var/rudder/configuration-repository/ncf/ncf-hooks.d/post.write_technique.commit.sh', u'/var/rudder/configuration-repository/ncf', u'fdsgfdsgdsfg']
Details:
and
An Error occured! Could not write technique 'fdsgfdsgdsfg' from path /var/rudder/configuration-repository/ncf, cause is: Error while running post-hook command [u'/var/rudder/configuration-repository/ncf/ncf-hooks.d/post.write_technique.rudderify.sh', u'/var/rudder/configuration-repository/ncf', u'fdsgfdsgdsfg']
Details: INFO: Alternative source path added: /var/rudder/configuration-repository/ncf
each time, because there is othing to commit in one of the part of the technique
- Project changed from 41 to Rudder
- Subject changed from Cannot save technique with ncf builder to ncf post-hooks failes when there is nothing to commit
- Category set to Web - Technique editor
- Target version changed from 0.x to 2.11.11
- Subject changed from ncf post-hooks failes when there is nothing to commit to ncf_rudder.py is not valid when using python 2.6
- Status changed from In progress to Pending technical review
- Assignee changed from Vincent MEMBRÉ to Benoît PECCATTE
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset ncf:commit:08053c559962098bd4260974df44bf0d42684064.
Applied in changeset ncf:commit:9874af8b455da8eccae6fa266ea07cf4b1d2a06b.
- Project changed from Rudder to 41
- Category deleted (
Web - Technique editor)
- Target version changed from 2.11.11 to 0.x
- Related to Bug #6531: Interface ncf builder can't read the created techniques added
- Status changed from Pending release to Released
- Target version changed from 0.x to ncf-0.x
- Priority set to 0
- Project changed from 41 to Rudder
- Category set to Generic methods
Also available in: Atom
PDF