summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Ward <peteraward@gmail.com>2012-07-20 18:15:30 +1000
committerPeter Ward <peteraward@gmail.com>2012-07-20 18:15:30 +1000
commit0f477d2ff7f57b1a61e6869988574a1825ab9d2c (patch)
treee9a0c70b8e8b389e5874cefbd093ed3f1a6013c0
parentff0c8eab701edc4312afdadbc6b142f1dbe545fc (diff)
Ensure we don't break on importing argparse on Python 2.6.
-rw-r--r--snakegame/__init__.py4
1 files 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',