Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(656)

Side by Side Diff: boto/sqs/queue.py

Issue 8386013: Merging in latest boto. (Closed) Base URL: svn://svn.chromium.org/boto
Patch Set: Redoing vendor drop by deleting and then merging. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « boto/sqs/jsonmessage.py ('k') | boto/storage_uri.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ 1 # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/
2 # 2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a 3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the 4 # copy of this software and associated documentation files (the
5 # "Software"), to deal in the Software without restriction, including 5 # "Software"), to deal in the Software without restriction, including
6 # without limitation the rights to use, copy, modify, merge, publish, dis- 6 # without limitation the rights to use, copy, modify, merge, publish, dis-
7 # tribute, sublicense, and/or sell copies of the Software, and to permit 7 # tribute, sublicense, and/or sell copies of the Software, and to permit
8 # persons to whom the Software is furnished to do so, subject to the fol- 8 # persons to whom the Software is furnished to do so, subject to the fol-
9 # lowing conditions: 9 # lowing conditions:
10 # 10 #
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 print 'writing message %d' % n 398 print 'writing message %d' % n
399 body = '' 399 body = ''
400 else: 400 else:
401 body = body + l 401 body = body + l
402 l = fp.readline() 402 l = fp.readline()
403 return n 403 return n
404 404
405 def load_from_filename(self, file_name, sep='\n'): 405 def load_from_filename(self, file_name, sep='\n'):
406 """Utility function to load messages from a local filename to a queue""" 406 """Utility function to load messages from a local filename to a queue"""
407 fp = open(file_name, 'rb') 407 fp = open(file_name, 'rb')
408 n = self.load_file_file(fp, sep) 408 n = self.load_from_file(fp, sep)
409 fp.close() 409 fp.close()
410 return n 410 return n
411 411
412 # for backward compatibility 412 # for backward compatibility
413 load = load_from_filename 413 load = load_from_filename
414 414
OLDNEW
« no previous file with comments | « boto/sqs/jsonmessage.py ('k') | boto/storage_uri.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698