From: Mike Hommey <mh@glandium.org>
Date: Sat, 11 Sep 2010 09:31:09 +0200
Subject: Use errno.ENOENT instead of "2" in JarMaker.py

https://bugzilla.mozilla.org/show_bug.cgi?id=595459
---
 config/JarMaker.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/config/JarMaker.py b/config/JarMaker.py
index 9bd5111..3029120 100644
--- a/config/JarMaker.py
+++ b/config/JarMaker.py
@@ -44,6 +44,7 @@ See the documentation for jar.mn on MDC for further details on the format.
 import sys
 import os
 import os.path
+import errno
 import re
 import logging
 from time import localtime
@@ -385,7 +386,7 @@ class JarMaker(object):
       try:
         os.remove(out)
       except OSError, e:
-        if e.errno != 2:
+        if e.errno != errno.ENOENT:
           raise
       return open(out, 'wb')
     def ensureDirFor(self, name):
@@ -405,7 +406,7 @@ class JarMaker(object):
       try:
         os.remove(out)
       except OSError, e:
-        if e.errno != 2:
+        if e.errno != errno.ENOENT:
           raise
       os.symlink(src, out)
 
