Beispiel #1
0
	def _load_pricelists(self):
		errors = []
		for fn in listdir(self.path):
			comps, ignore = processFn(fn)
			if ignore:
				continue
			try:
				bf = self._load_pricelist(fn, comps)
			except MildErr as me:
				errors.append(LoadErr("pricelist", fn, me))
				continue
			self.pricelists[bf.name] = bf
		if len(errors)>0:
			warn("Failed to load some pricelists: \n\t%s" 
				% "\n\t".join(map(repr,errors)))
Beispiel #2
0
	def _load_delivs(self, path, board):
		errors = []
		for fn in listdir(path):
			comps, ignore = processFn(fn)
			if ignore:
				continue
			try:
				d = self._load_deliv(path, fn, comps, board)
				d.event.register_deliv(d)
			except MildErr as me:
				errors.append(LoadErr("delivery", fn, me))
				continue
			self.delivs[d.code] = d
		if len(errors)>0:
			warn("Failed to load some deliveries: \n\t%s"
					% '\n\t'.join(map(repr, errors)))
Beispiel #3
0
	def _load_invcounts(self):
		errors = []
		for fn in listdir(self.path):
			comps, ignore = processFn(fn)
			if ignore:
				continue
			try:
				ic = self._load_invcount(fn, comps)
				ic.event.register_invcount(ic)
			except MildErr as me:
				errors.append(LoadErr('inventory-count',
					fn, me))
				continue
			self.invcounts[ic.code] = ic
		if len(errors)>0:
			warn("Failed to load some inventory counts: \n\t%s"
					% "\n\t".join(map(repr,errors)))
Beispiel #4
0
	def _load_barforms(self):
		self.barforms = {}
		errors = []
		for fn in listdir(self.path):
			if not ospath.isfile(ospath.join(self.path, fn)):
				continue
			comps, ignore = processFn(fn)
			if ignore:
				continue
			try:
				bf = self._load_barform(fn, comps)
				bf.event.register_barform(bf)
			except MildErr as me:
				errors.append(LoadErr("barform", fn, me))
				continue
			self.barforms[bf.number] = bf
		if len(errors)>0:
			warn("Failed to load some barforms: \n\t%s" 
					% '\n\t'.join(map(repr,errors)))