# HG changeset patch # User Jeff Hammel # Date 1390590185 28800 # Node ID c3f719824948ea8e7e2fae37edb94ba0e40a3f7f # Parent 668b01d04457bba421e8542060247e92f6419504 more allowable diff -r 668b01d04457 -r c3f719824948 makeitso/python.py --- a/makeitso/python.py Thu Jan 16 15:44:31 2014 -0800 +++ b/makeitso/python.py Fri Jan 24 11:03:05 2014 -0800 @@ -20,6 +20,7 @@ import os import shutil +import string import sys from cli import MakeItSoCLI from makeitso import ContentTemplate @@ -97,8 +98,9 @@ variables['project'] = self.output2name(output) # get package name from project - # XXX could have looser restrictions with transforms - assert variables['project'].isalnum(), 'Project name must be just letters, you gave %s' % variables['project'] + allowable = set(string.letters + string.digits + '_') + if not set(variables['project']).issubset(allowable): + raise AssertionError("Illegal fields in package name") variables['package'] = variables['project'].lower() # name of CLI main file