Skip to content

Commit

Permalink
remove photo jpeg files after generage JSON.
Browse files Browse the repository at this point in the history
Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>
  • Loading branch information
mkouhei committed Jul 11, 2011
1 parent 5e41a6d commit 4523893
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions with-couchdb/uploader/bulkphotos.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-


class JSONEncoderForCouchDB:

'''getting bulk_docs of Listing photo images taken with motion.'''
Expand Down Expand Up @@ -29,6 +30,10 @@ def getBulkDocsOfPhotos(self):

# append doc of photo to dictionary object as all_doc.
self.docs.append(self.doc)

# remove jpg files.
os.remove(self.filename)
os.remove(self.thumbnail_name)

# generate json as bulk_docs for CouchDB.
self.serializedJson()
Expand Down

0 comments on commit 4523893

Please sign in to comment.