Skip to content

Commit

Permalink
Fix linting errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenchio committed Jan 10, 2025
1 parent 88aa178 commit 37c684b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 2 additions & 6 deletions lambda-functions/newsletter_sign_up.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import json
import logging
import os
from json import JSONDecodeError

import boto3
import pipedrive
import sentry_sdk
from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration
from crisp_api import Crisp
Expand Down Expand Up @@ -32,13 +28,13 @@ def add_crisp_contact(event_body):
token_key = os.environ['CRISP_TOKEN_KEY']

if not (website_id and token_id and token_key):
warnings.warn('Crisp credentials are missing!')
logger.info('Crisp credentials are missing!')
return

crisp.authenticate(token_id, token_key)

try:
contact_data = crisp.website.add_new_people_profile(
crisp.website.add_new_people_profile(
website_id=website_id,
data={
'email': event_body['email'],
Expand Down
3 changes: 2 additions & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def deploy_lambda():

run(f'zip -qr ../{code_archive_name} .', cwd=package_deps_path)
run(
f'zip -qg {code_archive_name} pipedrive.py contact_form.py newsletter_sign_up.py',
f'zip -qg {code_archive_name} pipedrive.py contact_form.py '
f'newsletter_sign_up.py',
cwd=package_path,
)

Expand Down

0 comments on commit 37c684b

Please sign in to comment.