[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] Improve file headers in threadpool.py and cruft.py.



Signed-off-by: Torsten Werner <twerner@debian.org>
---
 daklib/cruft.py      |   23 +++++++++++++++++++++++
 daklib/threadpool.py |   20 +++++++++++---------
 2 files changed, 34 insertions(+), 9 deletions(-)

diff --git a/daklib/cruft.py b/daklib/cruft.py
index 0fc40f3..79787e2 100644
--- a/daklib/cruft.py
+++ b/daklib/cruft.py
@@ -1,3 +1,26 @@
+"""
+helper functions for cruft-report
+
+@contact: Debian FTPMaster <ftpmaster@debian.org>
+@copyright 2011 Torsten Werner <twerner@debian.org>
+"""
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+################################################################################
+
 from daklib.dbconn import *
 
 from sqlalchemy import func
diff --git a/daklib/threadpool.py b/daklib/threadpool.py
index f075f5c..f1b68ce 100644
--- a/daklib/threadpool.py
+++ b/daklib/threadpool.py
@@ -1,19 +1,21 @@
-import threading
-from time import sleep
+"""
+thread pool implementation for Python
 
-from daklib.config import Config
+@contact: Debian FTPMaster <ftpmaster@debian.org>
+@copyright: 2003 Tim Lesher
+@copyright: 2004 Carl Kleffner
+@copyright: 2010, 2011 Torsten Werner <twerner@debian.org>
+"""
 
 # This code is a modified copy of
 # http://code.activestate.com/recipes/203871-a-generic-programming-thread-pool/
 # and is licensed under the Python License. The full text of the license
 # is available in the file COPYING-PSF.
 
-# Ensure booleans exist (not needed for Python 2.2.1 or higher)
-try:
-    True
-except NameError:
-    False = 0
-    True = not False
+import threading
+from time import sleep
+
+from daklib.config import Config
 
 if Config().has_key('Common::ThreadCount'):
     defaultThreadCount = int(Config()['Common::ThreadCount'])
-- 
1.5.6.5


Reply to: