Преглед на файлове

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