summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Thénault <sylvain.thenault@logilab.fr>2014-07-25 10:34:53 +0200
committerSylvain Thénault <sylvain.thenault@logilab.fr>2014-07-25 10:34:53 +0200
commit17e760c92c956d89e4d6eef54de49eb2d07ed54c (patch)
treed3e42ad4ef73dff9b9f4d4bf85ea5e6e0e979b67
parent04727c9a31829b1c55c041f3bec646f29db13a3d (diff)
downloadlogilab-common-17e760c92c956d89e4d6eef54de49eb2d07ed54c.tar.gz
[shellutils] don't use class decorator, we still need py 2.5 compat for some time. Closes #258060
-rw-r--r--ChangeLog3
-rw-r--r--shellutils.py6
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0485cde..ed55101 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
ChangeLog for logilab.common
============================
+--
+ * shellutils: restore py 2.5 compat by removing usage of class decorator
+
2014-03-07 -- 0.62.0
* modutils: cleanup_sys_modules returns the list of cleaned modules
diff --git a/shellutils.py b/shellutils.py
index 28c2b42..69ee1e4 100644
--- a/shellutils.py
+++ b/shellutils.py
@@ -1,4 +1,4 @@
-# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
@@ -226,7 +226,7 @@ def unzip(archive, destdir):
outfile.write(zfobj.read(name))
outfile.close()
-@deprecated('Use subprocess.Popen instead')
+
class Execute:
"""This is a deadlock safe version of popen2 (no stdin), that returns
an object with errorlevel, out and err.
@@ -237,6 +237,8 @@ class Execute:
self.out, self.err = cmd.communicate()
self.status = os.WEXITSTATUS(cmd.returncode)
+Execute = deprecated('Use subprocess.Popen instead')(Execute)
+
def acquire_lock(lock_file, max_try=10, delay=10, max_delay=3600):
"""Acquire a lock represented by a file on the file system