Various fixes and improvements #5

Open
wants to merge 10 commits into
from

Projects

None yet

3 participants

@gpoulter
gpoulter commented Oct 3, 2011
  • Replace setup.py dependencies with pip requirements.txt
    • argparse is built-in on py2.7, setup.py tries to install over it.
    • boto package also found in ubuntu (on ec2 machines), setup.py tries to install over it too.
  • Fix error-handling in cmd_send by catching BotoServer error instead of checking message.
  • Improve logging in cmd_send by printing key=value pairs containing information
    about SES parameters, error code, request ID and message ID. Emitted log message of "timestamp key=value ..." format can be parsed natively by Splunk.
  • Fix list_verified to sort addresses
  • Change output of show_quota to match ses-get-stats.pl -q
  • Change output of show_stats to match output of ses-get-stats.pl -s
  • Remove out() function as it is no longer used
  • Clean up argparse usage, handle main
gpoulter added some commits Sep 1, 2011
@gpoulter gpoulter Add .gitignore 3444ae2
@gpoulter gpoulter Replace setup.py dependency with pip requirements
setup.py dependency handling is broken on Ubuntu
- argparse is built-in on py2.7, setup.py tries to install over it.
- boto also available via apt, setup.py tries to install over it too.

So created requirements.txt with boto>=2.0 instead.
b427b08
@gpoulter gpoulter Fix cmd_send error handling and improve logging
Fix error-handling in cmd_send by catching BotoServer error instead of checking message.

Improved logging in cmd_send by printing key=value pairs containing information
about SES parameters, error code, request ID and message ID.

Emitted log message of "timestamp key=value ..." format can be parsed natively by Splunk.
db08b7d
@gpoulter gpoulter Fix list_verified to sort addresses 1bcfe21
@gpoulter gpoulter Change output of show_quota to match ses-get-stats.pl -q af7f69f
@gpoulter gpoulter Change output of show_stats to match output of ses-get-stats.pl -s 7d42f96
@gpoulter gpoulter Remove out() function as it is no longer used 2d5d6e8
@gpoulter gpoulter Clean up argparse usage, handle __main__ be34179
@paltman
Collaborator
paltman commented Oct 4, 2011

I like everything here except for the change in the setup.py, can you explain why this change is needed? The package requires boto 2.0 and therefore belongs in install-requires of setup.py.

@gpoulter
gpoulter commented Oct 5, 2011

Ok, we can leave out setup.py revision then, I'll try figure out why it's not detecting the existing deps. I don't see a button to exclude it though, either I'll have to rebase again to leave it out and redo the pull request, or (simpler) add a reverting commit.

@gpoulter

Now it will only require argparse if the Python version is known to lack a built-in argparse, is that ok?

@arcturusannamalai

I found the new boto API has changed, and response struct has fields different than the code; current response has a format like,

{u'SendEmailResponse': {u'ResponseMetadata': {u'RequestId': u'0xLONGHEX'},
                        u'SendEmailResult': {u'MessageId': u'0xLONGHEX'}}}

due to this the postman send command will not respond correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment