Only import readline once

This commit is contained in:
Ole André Vadla Ravnås
2015-03-29 05:12:54 +02:00
parent 27372807d4
commit 0160426534
+3 -2
View File
@@ -4,10 +4,11 @@ def main():
import json
import platform
try:
import readline
# Stupid hack to workaround oxs's shitty readline impl
if platform.system() == "Darwin":
# We really want to avoid libedit
import gnureadline as readline
else:
import readline
HAVE_READLINE = True
except:
HAVE_READLINE = False