1 import os, linda
2 from linda import clparser
3 from linda.debug import dprint
4 from linda.output import OutputException
5 from linda.parser.debfilename import DebFilenameParser
6
12
14 for err_dict in errs.keys():
15 dprint(_("Printing data from %s.") % err_dict)
16 sorted_keys = errs[err_dict].keys()
17 sorted_keys.sort()
18 for tag in sorted_keys:
19 errs[err_dict][tag].sort()
20 if data_file.has_key(err_dict) and \
21 data_file[err_dict].has_key(tag):
22 onechar = self.get_single(data_file[err_dict][tag]['Type'])
23 else:
24 raise ErrorPrintingException("%s doesn't exist in %s!" % (tag, \
25 err_dict))
26 if onechar not in clparser['types']:
27 dprint(_("Told to skip type %s.") % \
28 data_file[err_dict][tag]['Type'])
29 continue
30 for data in errs[err_dict][tag]:
31 try:
32 linda.outputobj.print_out(tag, data, \
33 data_file[err_dict][tag], self.pkg_name)
34 except OutputException, e:
35 raise ErrorPrintingException(e)
36
38 is_up = map(lambda x: x.isupper(), str)
39 if reduce(lambda x, y: x + y, is_up):
40 return str[is_up.index(True)]
41 return ''
42
45