diff makeitso/python.py @ 238:a1a615aae3d1

dont give up so easily
author Jeff Hammel <k0scist@gmail.com>
date Thu, 21 Jan 2016 09:48:14 -0800
parents 65684aae6bfe
children cab05bfc59ab
line wrap: on
line diff
--- a/makeitso/python.py	Tue Dec 15 13:39:17 2015 -0800
+++ b/makeitso/python.py	Thu Jan 21 09:48:14 2016 -0800
@@ -113,9 +113,11 @@
 
         # get package name from 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()
+        package = variables['project'].lower()
+        package = ''.join([c for c in package
+                           if c in allowallable])
+        # TODO better: translation matrix
+        variables['package'] = package
 
         # name of CLI main file
         variables['main'] = 'main'