Commits

Anonymous committed 0db6b22

[svn] Allow boolean O opts to be specified without "=true".

  • Participants
  • Parent commits 341a36d
  • Branches trunk

Comments (0)

Files changed (1)

File pygments/__init__.py

         try:
             o_args = o_str.split(',')
             for o_arg in o_args:
-                o_key, o_val = o_arg.split('=')
-                O_opts[o_key] = o_val
+                try:
+                    o_key, o_val = o_arg.split('=')
+                except ValueError:
+                    O_opts[o_arg] = True
+                else:
+                    O_opts[o_key] = o_val
         except ValueError:
             print >>sys.stderr, 'Error in -O specification.'
             return 2