Mercurial > ~astiob > upreckon > hgweb
comparison upreckon-vcs @ 91:c62c9bfd614a
Removed import_error
It was buggy anyway.
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Mon, 28 Feb 2011 16:05:20 +0000 |
parents | 1fb319ec33af |
children | 796eb7667fb0 c4dba6d44194 |
comparison
equal
deleted
inserted
replaced
90:1fb319ec33af | 91:c62c9bfd614a |
---|---|
1 #! /usr/bin/env python | 1 #! /usr/bin/env python |
2 # Copyright (c) 2009-2011 Chortos-2 <chortos@inbox.lv> | 2 # Copyright (c) 2009-2011 Chortos-2 <chortos@inbox.lv> |
3 | 3 |
4 from __future__ import division, with_statement | 4 from __future__ import division, with_statement |
5 import optparse, sys, compat | 5 import optparse, sys, compat |
6 | |
7 def import_error(e): | |
8 say('Error: your installation of Upreckon is incomplete;', str(e).lower() + '.', file=sys.stderr) | |
9 sys.exit(3) | |
10 | 6 |
11 from compat import * | 7 from compat import * |
12 | 8 |
13 version = '2.00.0 ($$REV$$)' | 9 version = '2.00.0 ($$REV$$)' |
14 parser = optparse.OptionParser(version='Upreckon '+version, epilog='Python 2.5 or newer is required.') | 10 parser = optparse.OptionParser(version='Upreckon '+version, epilog='Python 2.5 or newer is required.') |
63 import config, itertools, os, subprocess, sys, time | 59 import config, itertools, os, subprocess, sys, time |
64 | 60 |
65 if options.legacy: | 61 if options.legacy: |
66 compat.pseudobuiltins += 'xrange', | 62 compat.pseudobuiltins += 'xrange', |
67 | 63 |
68 try: | 64 import testcases |
69 import testcases | |
70 except ImportError: | |
71 import_error(sys.exc_info()[1]) | |
72 | 65 |
73 try: | 66 try: |
74 from testcases import pause | 67 from testcases import pause |
75 except ImportError: | 68 except ImportError: |
76 pause = None | 69 pause = None |
87 elif os.name == 'nt': | 80 elif os.name == 'nt': |
88 globalconf.pause = 'pause' | 81 globalconf.pause = 'pause' |
89 else: | 82 else: |
90 sys.exit('Error: configuration variable pause is not defined and cannot be devised automatically.') | 83 sys.exit('Error: configuration variable pause is not defined and cannot be devised automatically.') |
91 | 84 |
92 try: | 85 from problem import * |
93 from problem import * | |
94 except ImportError: | |
95 import_error(sys.exc_info()[1]) | |
96 | 86 |
97 # Support single-problem configurations | 87 # Support single-problem configurations |
98 if globalconf.problems is None: | 88 if globalconf.problems is None: |
99 shouldprintnames = False | 89 shouldprintnames = False |
100 globalconf.multiproblem = False | 90 globalconf.multiproblem = False |