瀏覽代碼

fix missing global variable

oz123 11 年之前
父節點
當前提交
dee90934b0
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      pwman/ui/tools.py

+ 5 - 0
pwman/ui/tools.py

@@ -35,6 +35,11 @@ if sys.platform != 'win32':
     import tty
 
 _defaultwidth = 10
+try:
+    import readline
+    _readline_available = True
+except ImportError, e:
+    _readline_available = False
 
 class ANSI(object):
     """