| Line 17... |
Line 17... |
| 17 |
from email.mime.text import MIMEText
|
17 |
from email.mime.text import MIMEText
|
| 18 |
import email
|
18 |
import email
|
| 19 |
from email.mime.multipart import MIMEMultipart
|
19 |
from email.mime.multipart import MIMEMultipart
|
| 20 |
import email.encoders
|
20 |
import email.encoders
|
| 21 |
import copy
|
21 |
import copy
|
| - |
|
22 |
import traceback
|
| 22 |
|
23 |
|
| 23 |
config_client = ConfigClient()
|
24 |
config_client = ConfigClient()
|
| 24 |
host = config_client.get_property('staging_hostname')
|
25 |
host = config_client.get_property('staging_hostname')
|
| 25 |
DataService.initialize(db_hostname=host)
|
26 |
DataService.initialize(db_hostname=host)
|
| 26 |
|
27 |
|
| Line 102... |
Line 103... |
| 102 |
parent_category = Category.query.filter_by(id=category.parent_category_id).first()
|
103 |
parent_category = Category.query.filter_by(id=category.parent_category_id).first()
|
| 103 |
try:
|
104 |
try:
|
| 104 |
snapdealInfo = fetchData(br,snapdealItem.supc)
|
105 |
snapdealInfo = fetchData(br,snapdealItem.supc)
|
| 105 |
except Exception as e:
|
106 |
except Exception as e:
|
| 106 |
exceptionList.append(item)
|
107 |
exceptionList.append(item)
|
| - |
|
108 |
traceback.print_exc()
|
| 107 |
print "Unable to fetch details ",e
|
109 |
print "Unable to fetch details ",e
|
| 108 |
continue
|
110 |
continue
|
| 109 |
snapdealInfo.sellingPrice = snapdealItem.sellingPrice
|
111 |
snapdealInfo.sellingPrice = snapdealItem.sellingPrice
|
| 110 |
snapdealInfo.courierCost = snapdealItem.courierCostMarketplace
|
112 |
snapdealInfo.courierCost = snapdealItem.courierCostMarketplace
|
| 111 |
snapdealInfo.transferPrice = snapdealItem.transferPrice
|
113 |
snapdealInfo.transferPrice = snapdealItem.transferPrice
|
| Line 267... |
Line 269... |
| 267 |
mailServer.ehlo()
|
269 |
mailServer.ehlo()
|
| 268 |
mailServer.starttls()
|
270 |
mailServer.starttls()
|
| 269 |
mailServer.ehlo()
|
271 |
mailServer.ehlo()
|
| 270 |
|
272 |
|
| 271 |
#recipients = ['kshitij.sood@saholic.com']
|
273 |
#recipients = ['kshitij.sood@saholic.com']
|
| 272 |
recipients = ['rajneesh.arora@saholic.com','anikendra.das@saholic.com','kshitij.sood@saholic.com','khushal.bhatia@saholic.com','chaitnaya.vats@saholic.com','chandan.kumar@saholic.com','manoj.kumar@saholic.com','yukti.jain@saholic.com','ankush.dhingra@saholic.com','manoj.pal@saholic.com','sandeep.sachdeva@saholic.com']
|
274 |
recipients = ['rajneesh.arora@saholic.com','anikendra.das@saholic.com','kshitij.sood@saholic.com','khushal.bhatia@saholic.com','chaitnaya.vats@saholic.com','chandan.kumar@saholic.com','manoj.kumar@saholic.com','yukti.jain@saholic.com','ankush.dhingra@saholic.com','yatin.singh@saholic.com','sandeep.sachdeva@saholic.com']
|
| 273 |
msg = MIMEMultipart()
|
275 |
msg = MIMEMultipart()
|
| 274 |
msg['Subject'] = "Snapdeal TP Reconciliation" + ' - ' + str(datetime.now())
|
276 |
msg['Subject'] = "Snapdeal TP Reconciliation" + ' - ' + str(datetime.now())
|
| 275 |
msg['From'] = ""
|
277 |
msg['From'] = ""
|
| 276 |
msg['To'] = ",".join(recipients)
|
278 |
msg['To'] = ",".join(recipients)
|
| 277 |
msg.preamble = "Snapdeal TP Reconciliation" + ' - ' + str(datetime.now())
|
279 |
msg.preamble = "Snapdeal TP Reconciliation" + ' - ' + str(datetime.now())
|