diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | shellutils.py | 6 |
2 files changed, 7 insertions, 2 deletions
@@ -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 |