more optimizations to reduce lambda size

This commit is contained in:
EC2 Default User
2018-05-24 06:50:24 +00:00
parent 1ba5b74eeb
commit bfbb2e27a8
2 changed files with 4 additions and 10 deletions

View File

@@ -1,7 +1,6 @@
import os
import boto3
from boto.dynamodb2.exceptions import ResourceInUseException
db = boto3.resource('dynamodb')
@@ -47,7 +46,7 @@ def get_trade_table():
'WriteCapacityUnits': 1
}
)
except ResourceInUseException as e:
except Exception as e:
print("table already exist {}".format(e))
return db.Table(table_name)
@@ -93,7 +92,7 @@ def get_strategy_table():
'WriteCapacityUnits': 1
}
)
except ResourceInUseException as e:
except Exception as e:
print("table already exist {}".format(e))
return db.Table(table_name)