from os.path import dirname, basename, isfile
import glob
import sys

modules = glob.glob(dirname(__file__)+"/c*[0-9].py")
sys.path.append(dirname(__file__))

# Load all of the modules containing the challenge classes
modules = [basename(path)[:-3] for path in modules]
modules.sort() # Ensure that modules are in c1-c* order
modules = [__import__(mod) for mod in modules]

# Extract the challenge class from each module
challengeClasses = []
for i in range(1, len(modules)+1):
    challengeClasses.append(getattr(modules[i-1], 'c' + str(i)))

from os.path import dirname, basename, isfile
import glob
import sys

modules = glob.glob(dirname(__file__)+"/c*[0-9].py")
sys.path.append(dirname(__file__))

# Load all of the modules containing the challenge classes
modules = [basename(path)[:-3] for path in modules]
modules.sort() # Ensure that modules are in c1-c* order
modules = [__import__(mod) for mod in modules]

# Extract the challenge class from each module
challengeClasses = []
for i in range(1, len(modules)+1):
    try:
        challengeClasses.append(getattr(modules[i-1], 'c' + str(i)))
    except:
        continue

Fix bug in loading of c* modules
Fix bug in loading of c* modules

  from os.path import dirname, basename, isfile
  import glob
  import sys
  
  modules = glob.glob(dirname(__file__)+"/c*[0-9].py")
  sys.path.append(dirname(__file__))
  
  # Load all of the modules containing the challenge classes
  modules = [basename(path)[:-3] for path in modules]
  modules.sort() # Ensure that modules are in c1-c* order
  modules = [__import__(mod) for mod in modules]
  
  # Extract the challenge class from each module
  challengeClasses = []
  for i in range(1, len(modules)+1):
+     try:
-     challengeClasses.append(getattr(modules[i-1], 'c' + str(i)))
+         challengeClasses.append(getattr(modules[i-1], 'c' + str(i)))
+     except:
+         continue
  
Fix bug in loading of c* modules
## Code Before:
from os.path import dirname, basename, isfile
import glob
import sys

modules = glob.glob(dirname(__file__)+"/c*[0-9].py")
sys.path.append(dirname(__file__))

# Load all of the modules containing the challenge classes
modules = [basename(path)[:-3] for path in modules]
modules.sort() # Ensure that modules are in c1-c* order
modules = [__import__(mod) for mod in modules]

# Extract the challenge class from each module
challengeClasses = []
for i in range(1, len(modules)+1):
    challengeClasses.append(getattr(modules[i-1], 'c' + str(i)))

## Instruction:
Fix bug in loading of c* modules
## Code After:
from os.path import dirname, basename, isfile
import glob
import sys

modules = glob.glob(dirname(__file__)+"/c*[0-9].py")
sys.path.append(dirname(__file__))

# Load all of the modules containing the challenge classes
modules = [basename(path)[:-3] for path in modules]
modules.sort() # Ensure that modules are in c1-c* order
modules = [__import__(mod) for mod in modules]

# Extract the challenge class from each module
challengeClasses = []
for i in range(1, len(modules)+1):
    try:
        challengeClasses.append(getattr(modules[i-1], 'c' + str(i)))
    except:
        continue
