Skip to content

Commit

Permalink
removed lists from default func args
Browse files Browse the repository at this point in the history
  • Loading branch information
Vhati committed Sep 23, 2012
1 parent c80be6b commit ac9fa89
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/cleanup.py
Expand Up @@ -66,10 +66,20 @@ def _cleanup(self):

class CustomCleanupHandler(CleanupHandler):
"""A CleanupHandler that understands KillableThreads, sockets,
subprocess objects, and GuiApps."""
subprocess objects, and GuiApps.
def __init__(self, killable_threads=[], sockets=[], procs=[], guis=[]):
:param killable_threads: A list of KillableThread objects.
:param sockets: A list of socket objects.
:param procs: A list of subprocess objects.
:param guis: A list of GuiApp objects.
"""

def __init__(self, killable_threads=None, sockets=None, procs=None, guis=None):
CleanupHandler.__init__(self)
if (not killable_threads): killable_threads = []
if (not sockets): sockets = []
if (not procs): procs = []
if (not guis): guis = []
self.threads = killable_threads
self.sockets = sockets
self.procs = procs
Expand Down

0 comments on commit ac9fa89

Please sign in to comment.