X Tutup
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Hackthings/sendgrid-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: Khan/sendgrid-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on May 26, 2017

  1. Set headers early in the constructor, rather than late.

    `self.set_replyto()` can call `set.set_headers()`, but we were calling
    `set_replyto()` in `__init__` before we did `self.headers = {}`.  So
    `set_replyto` was failing with `self.headers not defined`.  This
    should fix that.
    
    I'd like to upgrade the sendgrid library instead, since the latest
    version has totally refactored how the Mail class is used.  But that
    would require changing from SendGridClient to SendGridAPIClient -- the
    former has gone away in latest versions of the sendgrid lib -- and
    that's a scary (though worthwhile) change.
    
    Auditors: kevindangoor
    
    Test plan:
    I ran
       python -c "import third_party.sendgrid as s; s.Mail(reply_to='FooBar <foo@bar.com>')"
    This failed with `'Mail' object has no attribute 'headers'` before my
    change, but passed after.
    csilvers committed May 26, 2017
    Configuration menu
    Copy the full SHA
    bf6d3ff View commit details
    Browse the repository at this point in the history
Loading
X Tutup