Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

releng - fix invalid escape sequences #5843

Merged
merged 1 commit into from
Jun 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/zpill.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def save_response(self, service, operation, response_data,
response_data['ResponseMetadata'] = {}

response_data = json.dumps(response_data, default=serialize)
response_data = re.sub("\d{12}", ACCOUNT_ID, response_data) # noqa
response_data = re.sub(r"\d{12}", ACCOUNT_ID, response_data) # noqa
response_data = json.loads(response_data, object_hook=deserialize)

super(RedPill, self).save_response(service, operation, response_data,
Expand Down
2 changes: 1 addition & 1 deletion tools/c7n_sentry/test_sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_preserve_full_message(self):


msg2 = """
2016-08-09 19:16:28,943 - ERROR - custodian.output - Error while executing policy Traceback (most recent call last):\n File "/usr/local/custodian/lib/python2.7/site-packages/c7n/policy.py", line 234, in poll\n results = a.process(resources)\n File "/usr/local/custodian/lib/python2.7/site-packages/c7n/resources/rds.py", line 291, in process\n client.delete_db_instance(**params)\n File "/usr/local/custodian/lib/python2.7/site-packages/botocore/client.py", line 278, in _api_call\n return self._make_api_call(operation_name, kwargs)\n File "/usr/local/custodian/lib/python2.7/site-packages/botocore/client.py", line 572, in _make_api_call\n raise ClientError(parsed_response, operation_name)\m ClientError: An error occurred (InvalidParameterValue) when calling the DeleteDBInstance operation: The parameter FinalDBSnapshotIdentifier is not a valid identifier. Identifiers must begin with a letter; must contain only ASCII letters, digits, and hyphens; and must not end with a hyphen or contain two consecutive hyphens.""" # NOQA
2016-08-09 19:16:28,943 - ERROR - custodian.output - Error while executing policy Traceback (most recent call last):\n File "/usr/local/custodian/lib/python2.7/site-packages/c7n/policy.py", line 234, in poll\n results = a.process(resources)\n File "/usr/local/custodian/lib/python2.7/site-packages/c7n/resources/rds.py", line 291, in process\n client.delete_db_instance(**params)\n File "/usr/local/custodian/lib/python2.7/site-packages/botocore/client.py", line 278, in _api_call\n return self._make_api_call(operation_name, kwargs)\n File "/usr/local/custodian/lib/python2.7/site-packages/botocore/client.py", line 572, in _make_api_call\n raise ClientError(parsed_response, operation_name)\n ClientError: An error occurred (InvalidParameterValue) when calling the DeleteDBInstance operation: The parameter FinalDBSnapshotIdentifier is not a valid identifier. Identifiers must begin with a letter; must contain only ASCII letters, digits, and hyphens; and must not end with a hyphen or contain two consecutive hyphens.""" # NOQA

if __name__ == '__main__':
unittest.main()