Ignore:
Timestamp:
Dec 16, 2013 10:43:01 AM (9 years ago)
Author:
toby
Message:

update imports to provide error messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sphinxdocs/build/html/_modules/G2phase_GPX.html

    r1129 r1168  
    5656<span class="c"># $Author: toby $</span>
    5757<span class="c"># $Revision: 1123 $</span>
    58 <span class="c"># $URL: https://subversion.xray.aps.anl.gov/pyGSAS/trunk/imports/G2phase_GPX.py $</span>
     58<span class="c"># $URL: https://subversion.xor.aps.anl.gov/pyGSAS/trunk/imports/G2phase_GPX.py $</span>
    5959<span class="c"># $Id: G2phase_GPX.py 1123 2013-10-25 19:24:22Z toby $</span>
    6060<span class="c">########### SVN repository information ###################</span>
     
    8383            <span class="n">longFormatName</span> <span class="o">=</span> <span class="s">&#39;GSAS-II project (.gpx file) import&#39;</span>
    8484            <span class="p">)</span>
    85     <span class="k">def</span> <span class="nf">ContentsValidator</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filepointer</span><span class="p">):</span>
     85<div class="viewcode-block" id="PhaseReaderClass.ContentsValidator"><a class="viewcode-back" href="../imports.html#G2phase_GPX.PhaseReaderClass.ContentsValidator">[docs]</a>    <span class="k">def</span> <span class="nf">ContentsValidator</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filepointer</span><span class="p">):</span>
    8686        <span class="c"># if the 1st section can&#39;t be read as a cPickle file, it can&#39;t be!</span>
    8787        <span class="k">try</span><span class="p">:</span>
     
    8989        <span class="k">except</span><span class="p">:</span>
    9090            <span class="k">return</span> <span class="bp">False</span>
    91         <span class="k">return</span> <span class="bp">True</span>
    92     <span class="k">def</span> <span class="nf">Reader</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">filename</span><span class="p">,</span><span class="n">filepointer</span><span class="p">,</span> <span class="n">ParentFrame</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="o">**</span><span class="n">unused</span><span class="p">):</span>
     91        <span class="k">return</span> <span class="bp">True</span></div>
     92<div class="viewcode-block" id="PhaseReaderClass.Reader"><a class="viewcode-back" href="../imports.html#G2phase_GPX.PhaseReaderClass.Reader">[docs]</a>    <span class="k">def</span> <span class="nf">Reader</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">filename</span><span class="p">,</span><span class="n">filepointer</span><span class="p">,</span> <span class="n">ParentFrame</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="o">**</span><span class="n">unused</span><span class="p">):</span>
    9393        <span class="k">try</span><span class="p">:</span>
    9494            <span class="n">phasenames</span> <span class="o">=</span> <span class="n">G2stIO</span><span class="o">.</span><span class="n">GetPhaseNames</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
     
    116116            <span class="k">print</span> <span class="n">sys</span><span class="o">.</span><span class="n">exc_info</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span> <span class="c"># for testing</span>
    117117            <span class="kn">import</span> <span class="nn">traceback</span>
    118             <span class="k">print</span> <span class="n">traceback</span><span class="o">.</span><span class="n">format_exc</span><span class="p">()</span></div>
     118            <span class="k">print</span> <span class="n">traceback</span><span class="o">.</span><span class="n">format_exc</span><span class="p">()</span></div></div>
    119119</pre></div>
    120120
Note: See TracChangeset for help on using the changeset viewer.