Commits

Anonymous committed 7dfc85d

default unicode

Comments (0)

Files changed (3)

examples/manage.py

 def output(name):
     "print something"
     print name
+    print type(name)
 
 @manager.command
 def outputplus(name, url=None):

flaskext/script.py

                     options.append(Option('-%s' % arg[0],
                                           '--%s' % arg,
                                           dest=arg,
+                                          type=unicode,
                                           required=False,
                                           default=default))
         
             else:
-                options.append(Option(arg))
+                options.append(Option(arg, type=unicode))
 
 
         command = Command()
         @manager.command
         def hello(name, url=None):
             if url:
+                assert type(url) is unicode
                 print "hello", name, "from", url
             else:
+                assert type(name) is unicode
                 print "hello", name
         
         assert 'hello' in manager._commands