# Buggy code
def __init__(
    self,
    config,
    maxCores,
    maxMemory,
    maxDisk,
    masterAddress,
    userScript=None,
    toilDistribution=None,
):
    AbstractBatchSystem.__init__(self, config, maxCores, maxMemory, maxDisk)
    # The hot-deployed resources representing the user script and the toil distribution
    # respectively. Will be passed along in every Mesos task. See
    # toil.common.HotDeployedResource for details.
    self.userScript = userScript
    self.toilDistribution = toilDistribution

    # Written to when mesos kills tasks, as directed by toil
    self.killedSet = set()

    # Dictionary of queues, which toil assigns jobs to. Each queue represents a job type,
    # defined by resource usage
    self.jobQueueList = defaultdict(list)

    # Address of Mesos master in the form host:port where host can be an IP or a hostname
    self.masterAddress = masterAddress

    # queue of jobs to kill, by jobID.
    self.killSet = set()

    # contains jobs on which killBatchJobs were called,
    # regardless of whether or not they actually were killed or
    # ended by themselves.
    self.intendedKill = set()

    # Dict of launched jobIDs to TaskData named tuple. Contains start time, executorID, and slaveID.
    self.runningJobMap = {}

    # Queue of jobs whose status has been updated, according to mesos. Req'd by toil
    self.updatedJobsQueue = Queue()

    # Wether to use implicit/explicit acknowledgments
    self.implicitAcknowledgements = self.getImplicit()

    # Reference to the Mesos driver used by this scheduler, to be instantiated in run()
    self.driver = None

    # FIXME: This comment makes no sense to me

    # Returns Mesos executor object, which is merged into Mesos tasks as they are built
    self.executor = self.buildExecutor()

    self.nextJobID = 0
    self.lastReconciliation = time.time()
    self.reconciliationPeriod = 120

    # Start the driver
    self._startDriver()


# Traceback (ConfigParser.NoSectionError)
DEBUG:toil.batchSystems.mesos.executor:Starting executor
I0924 22:47:08.587648 43191 exec.cpp:132] Version: 0.22.0
I0924 22:47:08.592193 43192 exec.cpp:206] Executor registered on slave 20150924-214557-83886090-5050-44087-S8
INFO:toil.batchSystems.mesos.executor:Registered with framework
DEBUG:toil.batchSystems.mesos.executor:Running task 0
DEBUG:toil.batchSystems.mesos.executor:Sending status update ...
DEBUG:toil.batchSystems.mesos.executor:Sent status update
DEBUG:toil.batchSystems.mesos.executor:Invoking command: '/usr/bin/python2.7 -E /usr/local/lib/python2.7/dist-packages/toil/worker.py azure:hgvm:tree2 683b1010_55c3_4978_a7e7_853f17ed1803'
DEBUG:toil.batchSystems.mesos.executor:Sent stats message
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/toil/worker.py", line 408, in <module>
main()
File "/usr/local/lib/python2.7/dist-packages/toil/worker.py", line 89, in main
jobStore = loadJobStore(jobStoreString)
File "/usr/local/lib/python2.7/dist-packages/toil/common.py", line 366, in loadJobStore
return AzureJobStore( account, namePrefix, config=config )
File "/usr/local/lib/python2.7/dist-packages/toil/jobStores/azureJobStore.py", line 78, in __init__
account_key = _fetchAzureAccountKey(accountName)
File "/usr/local/lib/python2.7/dist-packages/toil/jobStores/azureJobStore.py", line 63, in _fetchAzureAccountKey
return configParser.get('AzureStorageCredentials', accountName)
File "/usr/lib/python2.7/ConfigParser.py", line 330, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'AzureStorageCredentials'
DEBUG:toil.batchSystems.mesos.executor:Sending status update ...
DEBUG:toil.batchSystems.mesos.executor:Sent status update
I0924 22:47:09.738494 43200 exec.cpp:379] Executor asked to shutdown
CRITICAL:toil.batchSystems.mesos.executor:Shutting down executor...
CRITICAL:toil.batchSystems.mesos.executor:Executor shut down

# Fixed code
def __init__(
    self,
    config,
    maxCores,
    maxMemory,
    maxDisk,
    masterAddress,
    userScript=None,
    toilDistribution=None,
):
    AbstractBatchSystem.__init__(self, config, maxCores, maxMemory, maxDisk)
    # The hot-deployed resources representing the user script and the toil distribution
    # respectively. Will be passed along in every Mesos task. See
    # toil.common.HotDeployedResource for details.
    self.userScript = userScript
    self.toilDistribution = toilDistribution

    # Written to when mesos kills tasks, as directed by toil
    self.killedSet = set()

    # Dictionary of queues, which toil assigns jobs to. Each queue represents a job type,
    # defined by resource usage
    self.jobQueueList = defaultdict(list)

    # Address of Mesos master in the form host:port where host can be an IP or a hostname
    self.masterAddress = masterAddress

    # queue of jobs to kill, by jobID.
    self.killSet = set()

    # contains jobs on which killBatchJobs were called,
    # regardless of whether or not they actually were killed or
    # ended by themselves.
    self.intendedKill = set()

    # Dict of launched jobIDs to TaskData named tuple. Contains start time, executorID, and slaveID.
    self.runningJobMap = {}

    # Queue of jobs whose status has been updated, according to mesos. Req'd by toil
    self.updatedJobsQueue = Queue()

    # Whether to use implicit/explicit acknowledgments
    self.implicitAcknowledgements = self.getImplicit()

    # Reference to the Mesos driver used by this scheduler, to be instantiated in run()
    self.driver = None

    # FIXME: This comment makes no sense to me

    # Returns Mesos executor object, which is merged into Mesos tasks as they are built
    self.executor = self.buildExecutor()

    self.nextJobID = 0
    self.lastReconciliation = time.time()
    self.reconciliationPeriod = 120

    # Start the driver
    self._startDriver()