8000 Accomodate reviewer's comments. · oaktowner/python-docs-samples@b08b35c · GitHub
[go: up one dir, main page]

Skip to content

Commit b08b35c

Browse files
Accomodate reviewer's comments.
1 parent 965794c commit b08b35c

17 files changed

+33
-68
lines changed

appengine/mail/attachment.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
1415
from google.appengine.api import app_identity
1516
from google.appengine.api import mail
1617
import webapp2
@@ -20,18 +21,19 @@
2021
class AttachmentHandler(webapp2.RequestHandler):
2122
def post(self):
2223
f = self.request.POST['file']
23-
mail.send_mail(sender=('%s@appspot.gserviceaccount.com' %
24-
app_identity.get_application_id()),
24+
mail.send_mail(sender='{}@appspot.gserviceaccount.com'.format(
25+
app_identity.get_application_id()),
2526
to="Albert Johnson <Albert.Johnson@example.com>",
2627
subject="The doc you requested",
27-
body="""Attached is the document file you requested.
28+
body="""
29+
Attached is the document file you requested.
2830
2931
The example.com Team
3032
""",
3133
attachments=[(f.filename, f.file.read())])
3234
# [END send_attachment]
3335
self.response.content_type = 'text/plain'
34-
self.response.write('Sent %s to Albert.' % f.filename)
36+
self.response.write('Sent {} to Albert.'.format(f.filename))
3537

3638
def get(self):
3739
self.response.content_type = 'text/html'

appengine/mail/attachment_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
1415
import attachment
1516
import webtest
1617

appengine/mail/handle_bounced_email.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
1415
import logging
1516

1617
from google.appengine.ext.webapp.mail_handlers import BounceNotificationHandler

appengine/mail/handle_bounced_email_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
1415
from google.appengine.ext.webapp.mail_handlers import BounceNotification
1516

1617
import handle_bounced_email

appengine/mail/handle_catchall.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

appengine/mail/handle_incoming_email_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
1415
from google.appengine.api import mail
1516

1617
import handle_incoming_email

appengine/mail/handle_owner.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

appengine/mail/handle_support.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

appengine/mail/header.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ def get(self):
4242
def post(self):
4343
print repr(self.request.POST)
4444
id = self.request.POST['thread_id']
45-
send_example_mail('%s@appspot.gserviceaccount.com' %
46-
app_identity.get_application_id(), id)
45+
send_example_mail('{}@appspot.gserviceaccount.com'.format(
46+
app_identity.get_application_id()), id)
4747
self.response.content_type = 'text/plain'
4848
self.response.write(
49-
'Sent an email to Albert with Reference header set to %s.' % id)
49+
'Sent an email to Albert with Reference header set to {}.'
50+
.format(id))
5051

5152

5253
app = webapp2.WSGIApplication([

appengine/mail/header_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
1415
import header
1516
import webtest
1617

0 commit comments

Comments
 (0)
0