Example #1
0
    def outputErrors(self):

        if self.errors:

            # show the errors in a message box
            tkinter.messagebox.showinfo(message='\n'.join(self.errors))

            # email the errors
            self.email('\n'.join(self.errors))

            # write the errors to a file
            if settings.isset('standarderrordir'):
                with open(os.path.join(settings.get('standarderrordir'),'errorlog.txt'), 'a') as f:
                    for error in self.errors:
                        f.write(error + '\n')
Example #2
0
    def outputErrors(self):

        if self.errors:

            # show the errors in a message box
            tkinter.messagebox.showinfo(message='\n'.join(self.errors))

            # email the errors
            self.email('\n'.join(self.errors))

            # write the errors to a file
            if settings.isset('standarderrordir'):
                with open(
                        os.path.join(settings.get('standarderrordir'),
                                     'errorlog.txt'), 'a') as f:
                    for error in self.errors:
                        f.write(error + '\n')
Example #3
0
def outputErrors():

    if errors:

        # show the errors in a message box
        tkinter.messagebox.showinfo(message="\n".join(errors))

        # email the errors
        email("\n".join(errors))

        # write the errors to a file
        if settings.isset("stacksocialerrordir"):
            with open(os.path.join(settings.get("stacksocialerrordir"), "errorlog.txt"), "a") as f:
                for error in errors:
                    f.write(error + "\n")

        # delete the errors
        del errors[:]
Example #4
0
def outputErrors():

    if errors:

        # show the errors in a message box
        tkinter.messagebox.showinfo(message='\n'.join(errors))

        # email the errors
        email('\n'.join(errors))

        # write the errors to a file
        if settings.isset('halfoffdealserrordir'):
            with open(os.path.join(settings.get('halfoffdealserrordir'),'errorlog.txt'), 'a') as f:
                for error in errors:
                    f.write(error + '\n')

        # delete the errors
        del errors[:]
Example #5
0
def email(body):
    if settings.isset('mailDSOLto'):
        to = settings.get('mailDSOLto')
        subject = 'SkuTouch could not validate orders from Dance Shoes Online'
        print('Sending email to ' + to)
        mail.sendmail(to, subject, body)
Example #6
0
 def email(self, body):
     if settings.isset('mailstandardto'):
         to = settings.get('mailstandardto')
         subject = 'SkuTouch could not validate orders from '+self.market
         print('Sending email to ' + to)
         mail.sendmail(to, subject, body)
Example #7
0
def email(body):
    if settings.isset('mailrestaurantto'):
        to = settings.get('mailrestaurantto')
        subject = 'SkuTouch could not validate orders from Restaurant'
        print('Sending email to ' + to)
        mail.sendmail(to, subject, body)
Example #8
0
 def email(self, body):
     if settings.isset('mailstandardto'):
         to = settings.get('mailstandardto')
         subject = 'SkuTouch could not validate orders from ' + self.market
         print('Sending email to ' + to)
         mail.sendmail(to, subject, body)
Example #9
0
# Brenton Klassen
# Module for keeping track of incorrect orders
# 12/5/2014

import os
import csv
import db
import atexit
import settings

incorrectOrders = dict()
filePath = ''

if settings.isset('incorrectOrdersFile'):

    filePath = settings.get('incorrectOrdersFile')

    if os.path.isfile(filePath):

        with open(filePath) as f:

            for line in f:

                if line.strip():
                    lineElements = line.split()
                    merchantId = lineElements[0].strip()
                    shortOrderRef = lineElements[1].strip()
                    name = ' '.join(lineElements[2:])
                    incorrectOrders[(merchantId, shortOrderRef)] = name

Example #10
0
def email(body):
    if settings.isset('maillightaketo'):
        to = settings.get('maillightaketo')
        subject = 'SkuTouch could not validate orders from Lightake'
        print('Sending email to ' + to)
        mail.sendmail(to, subject, body)
Example #11
0
 def email(self, body):
     if settings.isset('mailmarvellousto'):
         to = settings.get('mailmarvellousto')
         subject = 'SkuTouch could not validate orders from Marvellous'
         print('Sending email to ' + to)
         mail.sendmail(to, subject, body)
Example #12
0
def email(body):
    if settings.isset('mailrestaurantto'):
        to = settings.get('mailrestaurantto')
        subject = 'SkuTouch could not validate orders from Restaurant'
        print('Sending email to ' + to)
        mail.sendmail(to, subject, body)
Example #13
0
def email(body):
    if settings.isset('maillightaketo'):
        to = settings.get('maillightaketo')
        subject = 'SkuTouch could not validate orders from Lightake'
        print('Sending email to ' + to)
        mail.sendmail(to, subject, body)
Example #14
0
def email(body):
    if settings.isset('maildealchickento'):
        to = settings.get('maildealchickento')
        subject = 'SkuTouch could not validate orders from Dealchicken'
        print('Sending email to ' + to)
        mail.sendmail(to, subject, body)
Example #15
0
def email(body):
    if settings.isset("mailstacksocialto"):
        to = settings.get("mailstacksocialto")
        subject = "SkuTouch could not validate orders from StackSocial"
        print("Sending email to " + to)
        mail.sendmail(to, subject, body)
Example #16
0
def email(body):
    if settings.isset('maildealchickento'):
        to = settings.get('maildealchickento')
        subject = 'SkuTouch could not validate orders from Dealchicken'
        print('Sending email to ' + to)
        mail.sendmail(to, subject, body)
Example #17
0
# Brenton Klassen
# Module for keeping track of incorrect orders
# 12/5/2014

import os
import csv
import db
import atexit
import settings

incorrectOrders = dict()
filePath = ''

if settings.isset('incorrectOrdersFile'):

	filePath = settings.get('incorrectOrdersFile')

	if os.path.isfile(filePath):

		with open(filePath) as f:
			
			for line in f:

				if line.strip():
					lineElements = line.split()
					merchantId = lineElements[0].strip()
					shortOrderRef = lineElements[1].strip()
					name = ' '.join(lineElements[2:])
					incorrectOrders[(merchantId,shortOrderRef)] = name

def exists(merchantId,shortOrderRef):
Example #18
0
 def email(self, body):
     if settings.isset('mailmarvellousto'):
         to = settings.get('mailmarvellousto')
         subject = 'SkuTouch could not validate orders from Marvellous'
         print('Sending email to ' + to)
         mail.sendmail(to, subject, body)
Example #19
0
def email(body):
    if settings.isset('mailstacksocialto'):
        to = settings.get('mailstacksocialto')
        subject = 'SkuTouch could not validate orders from StackSocial'
        print('Sending email to ' + to)
        mail.sendmail(to, subject, body)
Example #20
0
def email(body):
    if settings.isset('mailDSOLto'):
        to = settings.get('mailDSOLto')
        subject = 'SkuTouch could not validate orders from Dance Shoes Online'
        print('Sending email to ' + to)
        mail.sendmail(to, subject, body)
Example #21
0
def email(body):
    if settings.isset('mailhalfoffdealsto'):
        to = settings.get('mailhalfoffdealsto')
        subject = 'SkuTouch could not validate orders from Half Off Delas'
        print('Sending email to ' + to)
        mail.sendmail(to, subject, body)
Example #22
0
def email(body):
    if settings.isset('mailsweetjackto'):
        to = settings.get('mailsweetjackto')
        subject = 'SkuTouch could not validate orders from Sweetjack'
        print('Sending email to ' + to)
        mail.sendmail(to, subject, body)