# HG changeset patch # User Oleg Oshmyan # Date 1298909120 0 # Node ID c62c9bfd614a6c92a2b1a8e1585bc13f713ec58a # Parent 1fb319ec33af111fc79713559efc9fdca173d4b3 Removed import_error It was buggy anyway. diff -r 1fb319ec33af -r c62c9bfd614a config.py --- a/config.py Mon Feb 28 15:32:22 2011 +0000 +++ b/config.py Mon Feb 28 16:05:20 2011 +0000 @@ -2,14 +2,9 @@ from __future__ import division, with_statement -try: - from compat import * - import files -except ImportError: - import __main__ - __main__.import_error(sys.exc_info()[1]) -else: - from __main__ import options +from compat import * +import files +from __main__ import options if files.ZipArchive: try: diff -r 1fb319ec33af -r c62c9bfd614a files.py --- a/files.py Mon Feb 28 15:32:22 2011 +0000 +++ b/files.py Mon Feb 28 16:05:20 2011 +0000 @@ -4,12 +4,7 @@ from __future__ import division, with_statement -try: - from compat import * -except ImportError: - import __main__ - __main__.import_error(sys.exc_info()[1]) - +from compat import * import contextlib, os, shutil, sys # You don't need to know about anything else. diff -r 1fb319ec33af -r c62c9bfd614a problem.py --- a/problem.py Mon Feb 28 15:32:22 2011 +0000 +++ b/problem.py Mon Feb 28 16:05:20 2011 +0000 @@ -2,14 +2,9 @@ from __future__ import division, with_statement -try: - from compat import * - import config, testcases -except ImportError: - import __main__ - __main__.import_error(sys.exc_info()[1]) -else: - from __main__ import options +from compat import * +import config, testcases +from __main__ import options import os, re, sys diff -r 1fb319ec33af -r c62c9bfd614a testcases.py --- a/testcases.py Mon Feb 28 15:32:22 2011 +0000 +++ b/testcases.py Mon Feb 28 16:05:20 2011 +0000 @@ -4,14 +4,9 @@ from __future__ import division, with_statement -try: - from compat import * - import files, problem, config -except ImportError: - import __main__ - __main__.import_error(sys.exc_info()[1]) -else: - from __main__ import options +from compat import * +import files, problem, config +from __main__ import options import glob, re, sys, tempfile, time from subprocess import Popen, PIPE, STDOUT diff -r 1fb319ec33af -r c62c9bfd614a unix.py --- a/unix.py Mon Feb 28 15:32:22 2011 +0000 +++ b/unix.py Mon Feb 28 16:05:20 2011 +0000 @@ -1,14 +1,9 @@ # Copyright (c) 2010-2011 Chortos-2 from __future__ import division, with_statement -import sys -try: - from compat import * - import testcases # mutual import -except ImportError: - import __main__ - __main__.import_error(sys.exc_info()[1]) +from compat import * +import testcases # mutual import from subprocess import Popen import os, sys, time diff -r 1fb319ec33af -r c62c9bfd614a upreckon-vcs --- a/upreckon-vcs Mon Feb 28 15:32:22 2011 +0000 +++ b/upreckon-vcs Mon Feb 28 16:05:20 2011 +0000 @@ -4,10 +4,6 @@ from __future__ import division, with_statement import optparse, sys, compat -def import_error(e): - say('Error: your installation of Upreckon is incomplete;', str(e).lower() + '.', file=sys.stderr) - sys.exit(3) - from compat import * version = '2.00.0 ($$REV$$)' @@ -65,10 +61,7 @@ if options.legacy: compat.pseudobuiltins += 'xrange', -try: - import testcases -except ImportError: - import_error(sys.exc_info()[1]) +import testcases try: from testcases import pause @@ -89,10 +82,7 @@ else: sys.exit('Error: configuration variable pause is not defined and cannot be devised automatically.') - try: - from problem import * - except ImportError: - import_error(sys.exc_info()[1]) + from problem import * # Support single-problem configurations if globalconf.problems is None: diff -r 1fb319ec33af -r c62c9bfd614a win32.py --- a/win32.py Mon Feb 28 15:32:22 2011 +0000 +++ b/win32.py Mon Feb 28 16:05:20 2011 +0000 @@ -1,19 +1,15 @@ # Copyright (c) 2010-2011 Chortos-2 from __future__ import division, with_statement -import sys -try: - from compat import * - import testcases # mutual import -except ImportError: - import __main__ - __main__.import_error(sys.exc_info()[1]) +from compat import * +import testcases # mutual import from ctypes import * from ctypes.wintypes import * from msvcrt import getch as pause from subprocess import Popen +import sys try: from testcases import clock