[Python-apps-commits] r4334 - in packages/pyflakes/trunk/debian (2 files)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Sun Dec 20 21:07:22 UTC 2009


    Date: Sunday, December 20, 2009 @ 21:06:36
  Author: morph
Revision: 4334

* debian/patches/always_close_fd.diff
  - refreshed to reflect new code

Modified:
  packages/pyflakes/trunk/debian/changelog
  packages/pyflakes/trunk/debian/patches/always_close_fd.diff

Modified: packages/pyflakes/trunk/debian/changelog
===================================================================
--- packages/pyflakes/trunk/debian/changelog	2009-12-20 11:50:06 UTC (rev 4333)
+++ packages/pyflakes/trunk/debian/changelog	2009-12-20 21:06:36 UTC (rev 4334)
@@ -1,8 +1,10 @@
 pyflakes (0.4.0-1) UNRELEASED; urgency=low
 
   * New upstream release
+  * debian/patches/always_close_fd.diff
+    - refreshed to reflect new code
 
- -- Sandro Tosi <morph at debian.org>  Sun, 20 Dec 2009 12:49:29 +0100
+ -- Sandro Tosi <morph at debian.org>  Sun, 20 Dec 2009 22:04:25 +0100
 
 pyflakes (0.3.0-2) unstable; urgency=low
 

Modified: packages/pyflakes/trunk/debian/patches/always_close_fd.diff
===================================================================
--- packages/pyflakes/trunk/debian/patches/always_close_fd.diff	2009-12-20 11:50:06 UTC (rev 4333)
+++ packages/pyflakes/trunk/debian/patches/always_close_fd.diff	2009-12-20 21:06:36 UTC (rev 4334)
@@ -1,17 +1,21 @@
 # Be sure to close file descriptor (even in case of errors)
 
---- a/pyflakes/scripts/pyflakes.py
-+++ b/pyflakes/scripts/pyflakes.py
-@@ -41,7 +41,11 @@
+Index: pyflakes-0.4.0quilt/pyflakes/scripts/pyflakes.py
+===================================================================
+--- pyflakes-0.4.0quilt.orig/pyflakes/scripts/pyflakes.py	2009-12-20 19:20:53.933250864 +0100
++++ pyflakes-0.4.0quilt/pyflakes/scripts/pyflakes.py	2009-12-20 22:03:33.488043385 +0100
+@@ -75,8 +75,12 @@
      @return: the number of warnings printed
      """
-     if os.path.exists(filename):
+     try:
 -        return check(file(filename, 'U').read() + '\n', filename)
+-    except IOError, msg:
 +        fd = file(filename, 'U')
 +        try:
 +            return check(fd.read(), filename)
 +        finally:
 +            fd.close()
-     else:
-         print >> sys.stderr, '%s: no such file' % (filename,)
++   except IOError, msg:
+         print >> sys.stderr, "%s: %s" % (filename, msg.args[1])
          return 1
+ 




More information about the Python-apps-commits mailing list