[SCM] morituri/master: * morituri/common/common.py: * morituri/common/renamer.py: Pychecker fixes.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:09:02 UTC 2014


The following commit has been merged in the master branch:
commit 713a5d14fd03c11a4fcdfc3f414f57abdd0eb2f2
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Fri May 22 20:29:09 2009 +0000

    	* morituri/common/common.py:
    	* morituri/common/renamer.py:
    	  Pychecker fixes.

diff --git a/ChangeLog b/ChangeLog
index 9e1afa6..516417e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2009-05-22  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+	* morituri/common/common.py:
+	* morituri/common/renamer.py:
+	  Pychecker fixes.
+
+2009-05-22  Thomas Vander Stichele  <thomas at apestaart dot org>
+
 	* RELEASE:
 	* misc/pycheckerrc:
 	* misc/show-coverage.py:
diff --git a/morituri/common/common.py b/morituri/common/common.py
index c922fb7..d90b2c8 100644
--- a/morituri/common/common.py
+++ b/morituri/common/common.py
@@ -90,7 +90,7 @@ class Persister(object):
 
         self._unpickle(default)
 
-    def persist(self, object=None):
+    def persist(self, obj=None):
         """
         Persist the given object, if we have a persistence path and the
         object changed.
@@ -99,27 +99,27 @@ class Persister(object):
         If object is given, only persist if it was changed.
         """
         # don't pickle if it's already ok
-        if object and object == self.object:
+        if obj and obj == self.object:
             return
 
         # store the object on ourselves if not None
-        if object is not None:
-            self.object = object
+        if obj is not None:
+            self.object = obj
 
         # don't pickle if there is no path
         if not self._path:
             return
 
         # default to pickling our object again
-        if object is None:
-            object = self.object
+        if obj is None:
+            obj = self.object
 
         # pickle
-        self.object = object
+        self.object = obj
         (fd, path) = tempfile.mkstemp(suffix='.morituri.pickle')
         handle = os.fdopen(fd, 'wb')
         import pickle
-        pickle.dump(object, handle, 2)
+        pickle.dump(obj, handle, 2)
         handle.close()
         # do an atomic move
         shutil.move(path, self._path)
diff --git a/morituri/common/renamer.py b/morituri/common/renamer.py
index 6bf5e49..ae14526 100644
--- a/morituri/common/renamer.py
+++ b/morituri/common/renamer.py
@@ -200,13 +200,13 @@ class RenameInFile(Operation):
         # check if the source exists in the given file
 
     def do(self):
-        input = open(self._path)
+        handle = open(self._path)
         (fd, name) = tempfile.mkstemp(suffix='.morituri')
 
-        for s in input:
+        for s in handle:
             os.write(fd, s.replace(self._source, self._destination))
 
-        input.close()
+        handle.close()
         os.close(fd)
         os.rename(name, self._path)
 

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list