Skip to content

Commit

Permalink
Fix when no expressions or keep_warm is false
Browse files Browse the repository at this point in the history
When I set keep_warm_expression it fails with 
```
    events=events
  File "/Users/valery/.local/share/virtualenvs/document_data_extract_zappa-j8vc3Vbe/lib/python3.6/site-packages/zappa/core.py", line 2783, in schedule_events
    print("Could not create event {} - Please define either an expression or an event source".format(name))
UnboundLocalError: local variable 'name' referenced before assignment
```

So I fixed it.
  • Loading branch information
Valeriy Mukhtarulin authored Dec 5, 2020
1 parent 542c8c6 commit 6aabdf4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions zappa/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2780,6 +2780,7 @@ def schedule_events(self, lambda_arn, lambda_name, events, default=True):
elif rule_response == 'dryrun':
print("Dryrun for creating {} event schedule for {}!!".format(svc, function))
else:
name = self.get_scheduled_event_name(event, function, lambda_name)
print("Could not create event {} - Please define either an expression or an event source".format(name))


Expand Down

0 comments on commit 6aabdf4

Please sign in to comment.