Skip to content
Myr

Fixed complex example for Python 3. This fixes #142

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 13aa9c5 · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:examples/complex/complex/cli.py+3 added-2 removed
40 unmodified lines
41 return rv4243 def get_command(self, ctx, name):44 try:45 mod = __import__('complex.commands.cmd_' +46 name.encode('ascii', 'replace'),45 if sys.version_info[0] == 2:46 name = name.encode('ascii', 'replace')47 mod = __import__('complex.commands.cmd_' + name,48 None, None, ['cli'])49 except ImportError:50 return51 return mod.cli
14 unmodified lines