Project

General

Profile

« Previous | Next » 

Revision 54588

fixed counter increment

View differences:

s3_migration.py
24 24
		fs_path = item['fsPath']
25 25
		objectId = item['id']
26 26
		if os.path.isfile(fs_path):
27
			i += 1
27 28
			if not file_exist(bucket, '%s/%s'%(obsId,objectId)):
28 29
				key = bucket.new_key('%s/%s'%(obsId,objectId))
29 30
				try:
......
31 32
				except Exception as e:
32 33
					time.sleep(10)
33 34
					key.set_contents_from_filename(fs_path)
34
				i += 1
35
				
35 36
				item.pop('_id', None)
36 37
				item.pop('fsPath')
37 38
				item['uri'] = 's3://%s/%s'%(bucket.name, key.name)

Also available in: Unified diff