<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: propy.bat does not preserve python.exe exit code in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/propy-bat-does-not-preserve-python-exe-exit-code/m-p/93531#M7307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In propy.bat, try replacing the following&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;python.exe %*
@call %deactivate_path%&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;python.exe %*
@set pythonerror=%errorlevel%
@call %deactivate_path%
exit /b %pythonerror%&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 23:34:42 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2021-12-10T23:34:42Z</dc:date>
    <item>
      <title>propy.bat does not preserve python.exe exit code</title>
      <link>https://community.esri.com/t5/python-questions/propy-bat-does-not-preserve-python-exe-exit-code/m-p/93529#M7305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need the python.exe exit code to detect if our unit test suite has failed.&lt;BR /&gt;But propy.bat (ArcGIS Pro 2.1) does not preserve the exit code from python.exe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas for a workaround - or could we maybe see it fixed in a coming release?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 07:56:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/propy-bat-does-not-preserve-python-exe-exit-code/m-p/93529#M7305</guid>
      <dc:creator>MadsHoumann</dc:creator>
      <dc:date>2018-04-19T07:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: propy.bat does not preserve python.exe exit code</title>
      <link>https://community.esri.com/t5/python-questions/propy-bat-does-not-preserve-python-exe-exit-code/m-p/93530#M7306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps run your test suite in the arcgispro-py3 conda env (eg using proenv.bat) and call python directly rather than calling propy.bat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Apr 2018 09:02:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/propy-bat-does-not-preserve-python-exe-exit-code/m-p/93530#M7306</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2018-04-21T09:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: propy.bat does not preserve python.exe exit code</title>
      <link>https://community.esri.com/t5/python-questions/propy-bat-does-not-preserve-python-exe-exit-code/m-p/93531#M7307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In propy.bat, try replacing the following&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;python.exe %*
@call %deactivate_path%&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;python.exe %*
@set pythonerror=%errorlevel%
@call %deactivate_path%
exit /b %pythonerror%&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:34:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/propy-bat-does-not-preserve-python-exe-exit-code/m-p/93531#M7307</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-10T23:34:42Z</dc:date>
    </item>
  </channel>
</rss>

