+"""
+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
-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'])