title: Pyinstaller, NameError: global name 'quit' is not defined
body: <p>I have a python script which runs just fine, however after running pyinstaller, I get the following when I use a <code>quit()</code> or <code>exit()</code> command:</p>
  
  <p>Makespec file:</p>
  
  <pre><code># -*- mode: python -*-
  a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'), os.path.join(HOMEPATH,'support/useUnicode.py'), 'icinga.py'],
               pathex=['/home/user/projects/icinga_python/releases/onefile_v1.0'])
  pyz = PYZ(a.pure)
  exe = EXE( pyz,
            a.scripts,
            a.binaries,
            a.zipfiles,
            a.datas,
            name=os.path.join('dist', 'icinga'),
            debug=False,
            strip=False,
            upx=True,
            console=1 )
  </code></pre>
  
  <p>Here is what I see after I run the app:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;string&gt;", line 222, in &lt;module&gt;
    File "&lt;string&gt;", line 207, in main
    File "&lt;string&gt;", line 66, in icinga_mysql
    File "&lt;string&gt;", line 45, in checksanity
  NameError: global name 'quit' is not defined
  </code></pre>