[Python-modules-commits] r20471 - in packages/pyacoustid/trunk/debian (4 files)

laarmen-guest at users.alioth.debian.org laarmen-guest at users.alioth.debian.org
Thu Feb 16 13:34:15 UTC 2012


    Date: Thursday, February 16, 2012 @ 13:34:13
  Author: laarmen-guest
Revision: 20471

Backport a Python 2.6 fix from upstream

Added:
  packages/pyacoustid/trunk/debian/patches/
  packages/pyacoustid/trunk/debian/patches/python2.6_compatibility_fix
  packages/pyacoustid/trunk/debian/patches/series
Modified:
  packages/pyacoustid/trunk/debian/changelog

Modified: packages/pyacoustid/trunk/debian/changelog
===================================================================
--- packages/pyacoustid/trunk/debian/changelog	2012-02-15 22:08:55 UTC (rev 20470)
+++ packages/pyacoustid/trunk/debian/changelog	2012-02-16 13:34:13 UTC (rev 20471)
@@ -1,8 +1,9 @@
 pyacoustid (0.4-1) UNRELEASED; urgency=low
 
   * New upstream release
+  * Patch: 2.6 compatibility backported from upstream
 
- -- Simon Chopin <chopin.simon at gmail.com>  Wed, 25 Jan 2012 16:09:36 +0100
+ -- Simon Chopin <chopin.simon at gmail.com>  Thu, 16 Feb 2012 14:29:55 +0100
 
 pyacoustid (0.3-1) unstable; urgency=low
 

Added: packages/pyacoustid/trunk/debian/patches/python2.6_compatibility_fix
===================================================================
--- packages/pyacoustid/trunk/debian/patches/python2.6_compatibility_fix	                        (rev 0)
+++ packages/pyacoustid/trunk/debian/patches/python2.6_compatibility_fix	2012-02-16 13:34:13 UTC (rev 20471)
@@ -0,0 +1,26 @@
+Description: Fix the Python 2.6 compatibility
+Author: Adrian Sampson <adrian at radbox.org>
+Origin: upstream
+Bug: https://github.com/sampsyo/pyacoustid/issues/10
+Applied-Upstream: 5159686543753f1f6b36b5a259454723cec1df41
+Last-Update: 2012-02-16
+
+--- a/acoustid.py
++++ b/acoustid.py
+@@ -244,9 +244,14 @@
+     fpcalc = os.environ.get(FPCALC_ENVVAR, FPCALC_COMMAND)
+     command = [fpcalc, "-length", str(MAX_AUDIO_LENGTH), path]
+     try:
+-        output = subprocess.check_output(command)
+-    except (OSError, subprocess.CalledProcessError):
++        proc = subprocess.Popen(command, stdout=subprocess.PIPE)
++        output, _ = proc.communicate()
++    except OSError:
+         raise FingerprintGenerationError("fpcalc invocation failed")
++    retcode = proc.poll()
++    if retcode:
++        raise FingerprintGenerationError("fpcalc exited with status %i" %
++                                         retcode)
+ 
+     duration = fp = None
+     for line in output.splitlines():

Added: packages/pyacoustid/trunk/debian/patches/series
===================================================================
--- packages/pyacoustid/trunk/debian/patches/series	                        (rev 0)
+++ packages/pyacoustid/trunk/debian/patches/series	2012-02-16 13:34:13 UTC (rev 20471)
@@ -0,0 +1 @@
+python2.6_compatibility_fix




More information about the Python-modules-commits mailing list