浏览代码

Simplify error checking

Thomas Kluyver 11 年之前
父节点
当前提交
af5abee253
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      nsist/__init__.py

+ 2 - 1
nsist/__init__.py

@@ -140,7 +140,8 @@ def run_nsis(nsi_file):
             makensis = 'makensis'
         return call([makensis, nsi_file])
     except OSError as e:
-        if e.errno == errno.ENOENT or isinstance(e, WindowsError):
+        # This should catch either the registry key or makensis being absent
+        if e.errno == errno.ENOENT:
             print("makensis was not found. Install NSIS and try again.")
             print("http://nsis.sourceforge.net/Download")
             return 1