mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-24 02:54:05 +01:00
scripts: remove obsolete conditionals for Python 2
This commit is contained in:
parent
7e70ce43f2
commit
5c2e16f391
@ -42,17 +42,14 @@ import sys
|
||||
import atexit
|
||||
import shutil
|
||||
import signal
|
||||
if sys.version_info[0] < 3:
|
||||
import cStringIO as StringIO
|
||||
StringIO = StringIO.StringIO
|
||||
else:
|
||||
from io import StringIO
|
||||
|
||||
if sys.version_info < (3, 4, 0):
|
||||
sys.stderr.write('This program requires Python 3.4 or later.')
|
||||
sys.stderr.write(os.linesep)
|
||||
sys.exit(-1)
|
||||
|
||||
from io import StringIO # Import this after version check since this will fail on Python 2
|
||||
|
||||
def _termHandler(signalNumber, stackFrame):
|
||||
raise SystemExit('Signal #%s.' % signalNumber)
|
||||
|
||||
|
@ -36,9 +36,6 @@ import shutil
|
||||
|
||||
import supybot
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
basestring = str
|
||||
|
||||
def error(s):
|
||||
sys.stderr.write('%s\n' % s)
|
||||
sys.exit(-1)
|
||||
@ -217,7 +214,7 @@ class PluginDoc(object):
|
||||
indent = origindent + 1
|
||||
try:
|
||||
default = str(v)
|
||||
if not isinstance(v._default, basestring):
|
||||
if not isinstance(v._default, str):
|
||||
default = utils.str.dqrepr(default)
|
||||
help = v.help()
|
||||
except registry.NonExistentRegistryEntry:
|
||||
|
Loading…
Reference in New Issue
Block a user