From 0f477d2ff7f57b1a61e6869988574a1825ab9d2c Mon Sep 17 00:00:00 2001 From: Peter Ward Date: Fri, 20 Jul 2012 18:15:30 +1000 Subject: Ensure we don't break on importing argparse on Python 2.6. --- snakegame/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snakegame/__init__.py b/snakegame/__init__.py index 73e1060..c3e9f4e 100644 --- a/snakegame/__init__.py +++ b/snakegame/__init__.py @@ -1,5 +1,3 @@ -import argparse - from snakegame.engines import BUILTIN_ENGINES def first(d): @@ -21,6 +19,8 @@ def load_engine(name, builtins=BUILTIN_ENGINES): return import_thing(engine, 'Engine') def main(argv=None): + import argparse + parser = argparse.ArgumentParser(conflict_handler='resolve') parser.add_argument( '-e', '--engine', -- cgit v1.2.3