annotate commons/pyRepetUnit/doc/commons.Checker-pysrc.html @ 31:0ab839023fe4

Uploaded
author m-zytnicki
date Tue, 30 Apr 2013 14:33:21 -0400
parents 94ab73e8a190
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
1 <?xml version="1.0" encoding="ascii"?>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
3 "DTD/xhtml1-transitional.dtd">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
5 <head>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
6 <title>commons.Checker</title>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
7 <link rel="stylesheet" href="epydoc.css" type="text/css" />
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
8 <script type="text/javascript" src="epydoc.js"></script>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
9 </head>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
10
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
12 alink="#204080">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
13 <!-- ==================== NAVIGATION BAR ==================== -->
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
14 <table class="navbar" border="0" width="100%" cellpadding="0"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
15 bgcolor="#a0c0ff" cellspacing="0">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
16 <tr valign="middle">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
17
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
18 <!-- Tree link -->
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
19 <th>&nbsp;&nbsp;&nbsp;<a
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
20 href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
21
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
22 <!-- Index link -->
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
23 <th>&nbsp;&nbsp;&nbsp;<a
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
24 href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
25
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
26 <!-- Help link -->
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
27 <th>&nbsp;&nbsp;&nbsp;<a
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
28 href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
29
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
30 <th class="navbar" width="100%"></th>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
31 </tr>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
32 </table>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
33 <table width="100%" cellpadding="0" cellspacing="0">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
34 <tr valign="top">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
35 <td width="100%">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
36 <span class="breadcrumbs">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
37 Package&nbsp;commons ::
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
38 Module&nbsp;Checker
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
39 </span>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
40 </td>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
41 <td>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
42 <table cellpadding="0" cellspacing="0">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
43 <!-- hide/show private -->
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
44 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
45 onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
46 <tr><td align="right"><span class="options"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
47 >[<a href="frames.html" target="_top">frames</a
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
48 >]&nbsp;|&nbsp;<a href="commons.Checker-pysrc.html"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
49 target="_top">no&nbsp;frames</a>]</span></td></tr>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
50 </table>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
51 </td>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
52 </tr>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
53 </table>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
54 <h1 class="epydoc">Source Code for <a href="commons.Checker-module.html">Module commons.Checker</a></h1>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
55 <pre class="py-src">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
56 <a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-docstring">'''</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
57 <a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-docstring">Created on 9 avr. 2009</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
58 <a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
59 <a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-docstring">@author: oinizan</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
60 <a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring">'''</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
61 <a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">config</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
62 <a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">ConfigParser</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
63 <a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">ConfigParser</tt> <tt class="py-keyword">import</tt> <tt class="py-name">NoSectionError</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
64 <a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">ConfigParser</tt> <tt class="py-keyword">import</tt> <tt class="py-name">NoOptionError</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
65 <a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
66 <a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable commons.Checker.LOG_FILE=commons.Checker-module.html#LOG_FILE"><a title="commons.Checker.LOG_FILE" class="py-name" href="#" onclick="return doclink('link-0', 'LOG_FILE', 'link-0');">LOG_FILE</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"/home/oinizan/workspace/repet_pipe/pyRepetUnit/blaster/check/longconf.ini"</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
67 <a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable commons.Checker.DEFAULT_LOGGER_NAME=commons.Checker-module.html#DEFAULT_LOGGER_NAME"><a title="commons.Checker.DEFAULT_LOGGER_NAME" class="py-name" href="#" onclick="return doclink('link-1', 'DEFAULT_LOGGER_NAME', 'link-1');">DEFAULT_LOGGER_NAME</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"log02"</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
68 <a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
69 <a name="IChecker"></a><div id="IChecker-def"><a name="L14"></a><tt class="py-lineno"> 14</tt> <a class="py-toggle" href="#" id="IChecker-toggle" onclick="return toggle('IChecker');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="commons.Checker.IChecker-class.html">IChecker</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
70 </div><div id="IChecker-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IChecker-expanded"><a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
71 <a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-docstring"> Interface emulation for a checker </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
72 <a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
73 <a name="IChecker.check"></a><div id="IChecker.check-def"><a name="L18"></a><tt class="py-lineno"> 18</tt> <a class="py-toggle" href="#" id="IChecker.check-toggle" onclick="return toggle('IChecker.check');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="commons.Checker.IChecker-class.html#check">check</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">arg</tt><tt class="py-op">=</tt><tt class="py-string">""</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
74 </div><div id="IChecker.check-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IChecker.check-expanded"><a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
75 <a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-docstring"> perform check, raise a CheckerException if error occured</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
76 <a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
77 <a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"><tt class="py-docstring"> @param arg: a collecting parameter: put here all you need to perform check </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
78 <a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"><tt class="py-docstring"> @type arg: choose the appropriate type</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
79 <a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
80 <a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
81 </div></div><a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
82 <a name="Checker"></a><div id="Checker-def"><a name="L27"></a><tt class="py-lineno"> 27</tt> <a class="py-toggle" href="#" id="Checker-toggle" onclick="return toggle('Checker');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="commons.Checker.Checker-class.html">Checker</a> <tt class="py-op">(</tt><tt class="py-base-class">IChecker</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
83 </div><div id="Checker-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Checker-expanded"><a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
84 <a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"><tt class="py-docstring"> A concrete checker implementation with a logging.</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
85 <a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"><tt class="py-docstring"> Logger instance is a singleton of logging module </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
86 <a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
87 <a name="Checker._handle"></a><div id="Checker._handle-def"><a name="L32"></a><tt class="py-lineno"> 32</tt> <a class="py-toggle" href="#" id="Checker._handle-toggle" onclick="return toggle('Checker._handle');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="commons.Checker.Checker-class.html#_handle">_handle</a> <tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
88 </div><div id="Checker._handle-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Checker._handle-expanded"><a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
89 <a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"> <tt class="py-name">single</tt> <tt class="py-op">=</tt> <tt id="link-2" class="py-name" targets="Class commons.Checker._Logger=commons.Checker._Logger-class.html"><a title="commons.Checker._Logger" class="py-name" href="#" onclick="return doclink('link-2', '_Logger', 'link-2');">_Logger</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
90 <a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt id="link-3" class="py-name"><a title="commons.Checker._Logger" class="py-name" href="#" onclick="return doclink('link-3', '_Logger', 'link-2');">_Logger</a></tt><tt class="py-op">,</tt> <tt class="py-name">l</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
91 <a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"> <tt class="py-name">single</tt> <tt class="py-op">=</tt> <tt class="py-name">l</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
92 <a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">single</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
93 </div><a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
94 <a name="Checker.__init__"></a><div id="Checker.__init__-def"><a name="L39"></a><tt class="py-lineno"> 39</tt> <a class="py-toggle" href="#" id="Checker.__init__-toggle" onclick="return toggle('Checker.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="commons.Checker.Checker-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
95 </div><div id="Checker.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Checker.__init__-expanded"><a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"> <tt class="py-name">logger</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method commons.Checker.Checker._handle()=commons.Checker.Checker-class.html#_handle"><a title="commons.Checker.Checker._handle" class="py-name" href="#" onclick="return doclink('link-4', '_handle', 'link-4');">_handle</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
96 <a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_log</tt> <tt class="py-op">=</tt> <tt class="py-name">logger</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Method commons.Checker.Checker.getLogger()=commons.Checker.Checker-class.html#getLogger,Method commons.Checker._Logger.getLogger()=commons.Checker._Logger-class.html#getLogger"><a title="commons.Checker.Checker.getLogger
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
97 commons.Checker._Logger.getLogger" class="py-name" href="#" onclick="return doclink('link-5', 'getLogger', 'link-5');">getLogger</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
98 </div><a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
99 <a name="Checker.setLogger"></a><div id="Checker.setLogger-def"><a name="L43"></a><tt class="py-lineno"> 43</tt> <a class="py-toggle" href="#" id="Checker.setLogger-toggle" onclick="return toggle('Checker.setLogger');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="commons.Checker.Checker-class.html#setLogger">setLogger</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">logger</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
100 </div><div id="Checker.setLogger-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Checker.setLogger-expanded"><a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
101 <a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"><tt class="py-docstring"> set (change) default logger</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
102 <a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
103 <a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"><tt class="py-docstring"> @param logger: a new logger</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
104 <a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"><tt class="py-docstring"> @type logger: class Logger </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
105 <a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
106 <a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_log</tt> <tt class="py-op">=</tt> <tt class="py-name">logger</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
107 </div><a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
108 <a name="Checker.getLogger"></a><div id="Checker.getLogger-def"><a name="L52"></a><tt class="py-lineno"> 52</tt> <a class="py-toggle" href="#" id="Checker.getLogger-toggle" onclick="return toggle('Checker.getLogger');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="commons.Checker.Checker-class.html#getLogger">getLogger</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
109 </div><div id="Checker.getLogger-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Checker.getLogger-expanded"><a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
110 <a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"><tt class="py-docstring"> returns the logger instance</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
111 <a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
112 <a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_log</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
113 </div></div><a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
114 <a name="CheckerException"></a><div id="CheckerException-def"><a name="L58"></a><tt class="py-lineno"> 58</tt> <a class="py-toggle" href="#" id="CheckerException-toggle" onclick="return toggle('CheckerException');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="commons.Checker.CheckerException-class.html">CheckerException</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
115 </div><div id="CheckerException-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="CheckerException-expanded"><a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
116 <a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"><tt class="py-docstring"> Exception raised during check. </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
117 <a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
118 <a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"><tt class="py-docstring"> @ivar msg : message embeded in Execption class </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
119 <a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"><tt class="py-docstring"> @type msg: str</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
120 <a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
121 <a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
122 <a name="CheckerException.__init__"></a><div id="CheckerException.__init__-def"><a name="L66"></a><tt class="py-lineno"> 66</tt> <a class="py-toggle" href="#" id="CheckerException.__init__-toggle" onclick="return toggle('CheckerException.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="commons.Checker.CheckerException-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">msg</tt><tt class="py-op">=</tt><tt class="py-string">""</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
123 </div><div id="CheckerException.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="CheckerException.__init__-expanded"><a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
124 <a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"> <tt class="py-name">Exception</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method commons.Checker.Checker.__init__()=commons.Checker.Checker-class.html#__init__,Method commons.Checker.CheckerException.__init__()=commons.Checker.CheckerException-class.html#__init__,Method commons.Checker.ConfigChecker.__init__()=commons.Checker.ConfigChecker-class.html#__init__,Method commons.Checker.ConfigException.__init__()=commons.Checker.ConfigException-class.html#__init__,Method commons.Checker._Logger.__init__()=commons.Checker._Logger-class.html#__init__"><a title="commons.Checker.Checker.__init__
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
125 commons.Checker.CheckerException.__init__
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
126 commons.Checker.ConfigChecker.__init__
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
127 commons.Checker.ConfigException.__init__
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
128 commons.Checker._Logger.__init__" class="py-name" href="#" onclick="return doclink('link-6', '__init__', 'link-6');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
129 </div></div><a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
130 <a name="ConfigChecker"></a><div id="ConfigChecker-def"><a name="L70"></a><tt class="py-lineno"> 70</tt> <a class="py-toggle" href="#" id="ConfigChecker-toggle" onclick="return toggle('ConfigChecker');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="commons.Checker.ConfigChecker-class.html">ConfigChecker</a> <tt class="py-op">(</tt><tt class="py-base-class">IChecker</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
131 </div><div id="ConfigChecker-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ConfigChecker-expanded"><a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
132 <a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"><tt class="py-docstring"> A checker for config file. </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
133 <a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"><tt class="py-docstring"> @ivar sectionName: section to check in config file</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
134 <a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"><tt class="py-docstring"> @type sectionName: str</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
135 <a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
136 <a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"><tt class="py-docstring"> @ivar optionsDict: dict with option to check as keys and empty strings "" as values</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
137 <a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"><tt class="py-docstring"> @type optionsDict: class Dict</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
138 <a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
139 <a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
140 <a name="ConfigChecker.__init__"></a><div id="ConfigChecker.__init__-def"><a name="L80"></a><tt class="py-lineno"> 80</tt> <a class="py-toggle" href="#" id="ConfigChecker.__init__-toggle" onclick="return toggle('ConfigChecker.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="commons.Checker.ConfigChecker-class.html#__init__">__init__</a> <tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">sectionName</tt><tt class="py-op">,</tt> <tt class="py-param">optionsDict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
141 </div><div id="ConfigChecker.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ConfigChecker.__init__-expanded"><a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_sectionName</tt> <tt class="py-op">=</tt> <tt class="py-name">sectionName</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
142 <a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_optionsDict</tt> <tt class="py-op">=</tt> <tt class="py-name">optionsDict</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
143 </div><a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"> <tt class="py-string">"""</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
144 <a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"><tt class="py-string"> Check options stored in optionsDict. 3 checks are performed:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
145 <a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"><tt class="py-string"> (i) config file existence, (ii) section existence, (iii) options existences</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
146 <a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"><tt class="py-string"> If a check fail, raise a ConfigException with a list of messages</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
147 <a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"><tt class="py-string"> """</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
148 <a name="ConfigChecker.check"></a><div id="ConfigChecker.check-def"><a name="L88"></a><tt class="py-lineno"> 88</tt> <a class="py-toggle" href="#" id="ConfigChecker.check-toggle" onclick="return toggle('ConfigChecker.check');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="commons.Checker.ConfigChecker-class.html#check">check</a> <tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">configFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
149 </div><div id="ConfigChecker.check-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ConfigChecker.check-expanded"><a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"> <tt class="py-name">config</tt> <tt class="py-op">=</tt> <tt class="py-name">ConfigParser</tt><tt class="py-op">.</tt><tt class="py-name">ConfigParser</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
150 <a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"> <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
151 <a name="L91"></a><tt class="py-lineno"> 91</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
152 <a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt class="py-name">config</tt><tt class="py-op">.</tt><tt class="py-name">readfp</tt><tt class="py-op">(</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">configFile</tt><tt class="py-op">)</tt> <tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
153 <a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
154 <a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">"CONFIG FILE not found - "</tt> <tt class="py-op">+</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">message</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
155 <a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-7" class="py-name" targets="Class commons.Checker.ConfigException=commons.Checker.ConfigException-class.html"><a title="commons.Checker.ConfigException" class="py-name" href="#" onclick="return doclink('link-7', 'ConfigException', 'link-7');">ConfigException</a></tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
156 <a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
157 <a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">config</tt><tt class="py-op">.</tt><tt class="py-name">has_section</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_sectionName</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
158 <a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">"["</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_sectionName</tt> <tt class="py-op">+</tt> <tt class="py-string">"]"</tt> <tt class="py-op">+</tt> <tt class="py-string">" section not found - "</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
159 <a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-8" class="py-name"><a title="commons.Checker.ConfigException" class="py-name" href="#" onclick="return doclink('link-8', 'ConfigException', 'link-7');">ConfigException</a></tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
160 <a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
161 <a name="L101"></a><tt class="py-lineno">101</tt> <tt class="py-line"> <tt class="py-name">isExceptionOccured</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
162 <a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_optionsDict</tt><tt class="py-op">.</tt><tt class="py-name">keys</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
163 <a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
164 <a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_optionsDict</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">config</tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_sectionName</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
165 <a name="L105"></a><tt class="py-lineno">105</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">NoOptionError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
166 <a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">"["</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_sectionName</tt> <tt class="py-op">+</tt> <tt class="py-string">"]"</tt> <tt class="py-op">+</tt> <tt class="py-string">" - "</tt> <tt class="py-op">+</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">message</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
167 <a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"> <tt class="py-name">isExceptionOccured</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
168 <a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
169 <a name="L109"></a><tt class="py-lineno">109</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">isExceptionOccured</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
170 <a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-9" class="py-name"><a title="commons.Checker.ConfigException" class="py-name" href="#" onclick="return doclink('link-9', 'ConfigException', 'link-7');">ConfigException</a></tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
171 </div></div><a name="L111"></a><tt class="py-lineno">111</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
172 <a name="ConfigException"></a><div id="ConfigException-def"><a name="L112"></a><tt class="py-lineno">112</tt> <a class="py-toggle" href="#" id="ConfigException-toggle" onclick="return toggle('ConfigException');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="commons.Checker.ConfigException-class.html">ConfigException</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
173 </div><div id="ConfigException-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ConfigException-expanded"><a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
174 <a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
175 <a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line"><tt class="py-docstring"> A exception raised by check method class ConfigChecker</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
176 <a name="L116"></a><tt class="py-lineno">116</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
177 <a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"><tt class="py-docstring"> @ivar msg : message embeded in Execption class </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
178 <a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"><tt class="py-docstring"> @type msg: str</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
179 <a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
180 <a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"><tt class="py-docstring"> @ivar messages: list of messages</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
181 <a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"><tt class="py-docstring"> @type messages: Class list</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
182 <a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
183 <a name="L123"></a><tt class="py-lineno">123</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
184 <a name="ConfigException.__init__"></a><div id="ConfigException.__init__-def"><a name="L124"></a><tt class="py-lineno">124</tt> <a class="py-toggle" href="#" id="ConfigException.__init__-toggle" onclick="return toggle('ConfigException.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="commons.Checker.ConfigException-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">msg</tt><tt class="py-op">,</tt> <tt class="py-param">messages</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
185 </div><div id="ConfigException.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ConfigException.__init__-expanded"><a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt> <tt class="py-op">=</tt> <tt class="py-name">messages</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
186 <a name="L126"></a><tt class="py-lineno">126</tt> <tt class="py-line"> <tt class="py-name">Exception</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="commons.Checker.Checker.__init__
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
187 commons.Checker.CheckerException.__init__
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
188 commons.Checker.ConfigChecker.__init__
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
189 commons.Checker.ConfigException.__init__
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
190 commons.Checker._Logger.__init__" class="py-name" href="#" onclick="return doclink('link-10', '__init__', 'link-6');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
191 </div></div><a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
192 <a name="_Logger"></a><div id="_Logger-def"><a name="L128"></a><tt class="py-lineno">128</tt> <a class="py-toggle" href="#" id="_Logger-toggle" onclick="return toggle('_Logger');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="commons.Checker._Logger-class.html">_Logger</a><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
193 </div><div id="_Logger-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_Logger-expanded"><a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
194 <a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line"> <tt class="py-name">__single</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
195 <a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
196 <a name="_Logger.__init__"></a><div id="_Logger.__init__-def"><a name="L132"></a><tt class="py-lineno">132</tt> <a class="py-toggle" href="#" id="_Logger.__init__-toggle" onclick="return toggle('_Logger.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="commons.Checker._Logger-class.html#__init__">__init__</a><tt class="py-op">(</tt> <tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">loggerName</tt> <tt class="py-op">=</tt><tt class="py-string">""</tt> <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
197 </div><div id="_Logger.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_Logger.__init__-expanded"><a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-11" class="py-name"><a title="commons.Checker._Logger" class="py-name" href="#" onclick="return doclink('link-11', '_Logger', 'link-2');">_Logger</a></tt><tt class="py-op">.</tt><tt class="py-name">__single</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
198 <a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-12" class="py-name"><a title="commons.Checker._Logger" class="py-name" href="#" onclick="return doclink('link-12', '_Logger', 'link-2');">_Logger</a></tt><tt class="py-op">.</tt><tt class="py-name">__single</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
199 <a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">.</tt><tt class="py-name">fileConfig</tt><tt class="py-op">(</tt><tt id="link-13" class="py-name"><a title="commons.Checker.LOG_FILE" class="py-name" href="#" onclick="return doclink('link-13', 'LOG_FILE', 'link-0');">LOG_FILE</a></tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
200 <a name="L136"></a><tt class="py-lineno">136</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">loggerName</tt> <tt class="py-op">!=</tt> <tt class="py-string">""</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
201 <a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__log</tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="commons.Checker.Checker.getLogger
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
202 commons.Checker._Logger.getLogger" class="py-name" href="#" onclick="return doclink('link-14', 'getLogger', 'link-5');">getLogger</a></tt><tt class="py-op">(</tt><tt class="py-name">loggerName</tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
203 <a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
204 <a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__log</tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="commons.Checker.Checker.getLogger
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
205 commons.Checker._Logger.getLogger" class="py-name" href="#" onclick="return doclink('link-15', 'getLogger', 'link-5');">getLogger</a></tt><tt class="py-op">(</tt><tt id="link-16" class="py-name"><a title="commons.Checker.DEFAULT_LOGGER_NAME" class="py-name" href="#" onclick="return doclink('link-16', 'DEFAULT_LOGGER_NAME', 'link-1');">DEFAULT_LOGGER_NAME</a></tt><tt class="py-op">)</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
206 <a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"> <tt id="link-17" class="py-name"><a title="commons.Checker._Logger" class="py-name" href="#" onclick="return doclink('link-17', '_Logger', 'link-2');">_Logger</a></tt><tt class="py-op">.</tt><tt class="py-name">__single</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
207 </div><a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
208 <a name="_Logger.getLogger"></a><div id="_Logger.getLogger-def"><a name="L142"></a><tt class="py-lineno">142</tt> <a class="py-toggle" href="#" id="_Logger.getLogger-toggle" onclick="return toggle('_Logger.getLogger');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="commons.Checker._Logger-class.html#getLogger">getLogger</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
209 </div><div id="_Logger.getLogger-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_Logger.getLogger-expanded"><a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__log</tt> </tt>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
210 </div></div><a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> </tt><script type="text/javascript">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
211 <!--
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
212 expandto(location.href);
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
213 // -->
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
214 </script>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
215 </pre>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
216 <br />
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
217 <!-- ==================== NAVIGATION BAR ==================== -->
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
218 <table class="navbar" border="0" width="100%" cellpadding="0"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
219 bgcolor="#a0c0ff" cellspacing="0">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
220 <tr valign="middle">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
221
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
222 <!-- Tree link -->
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
223 <th>&nbsp;&nbsp;&nbsp;<a
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
224 href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
225
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
226 <!-- Index link -->
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
227 <th>&nbsp;&nbsp;&nbsp;<a
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
228 href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
229
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
230 <!-- Help link -->
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
231 <th>&nbsp;&nbsp;&nbsp;<a
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
232 href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
233
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
234 <th class="navbar" width="100%"></th>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
235 </tr>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
236 </table>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
237 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
238 <tr>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
239 <td align="left" class="footer">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
240 Generated by Epydoc 3.0.1 on Fri Apr 10 16:39:01 2009
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
241 </td>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
242 <td align="right" class="footer">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
243 <a target="mainFrame" href="http://epydoc.sourceforge.net"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
244 >http://epydoc.sourceforge.net</a>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
245 </td>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
246 </tr>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
247 </table>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
248
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
249 <script type="text/javascript">
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
250 <!--
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
251 // Private objects are initially displayed (because if
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
252 // javascript is turned off then we want them to be
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
253 // visible); but by default, we want to hide them. So hide
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
254 // them unless we have a cookie that says to show them.
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
255 checkCookie();
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
256 // -->
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
257 </script>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
258 </body>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
259 </html>