File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ def dimensions(self):
92
92
"""
93
93
try :
94
94
call = fcntl .ioctl (self .termfd , termios .TIOCGWINSZ , "\000 " * 8 )
95
- except :
95
+ except IOError :
96
96
return (79 , 40 )
97
97
else :
98
98
height , width = struct .unpack ("hhhh" , call )[:2 ]
Original file line number Diff line number Diff line change @@ -91,7 +91,8 @@ def compile_speedup():
91
91
sauce = join (dirname (__file__ ), '_xterm256.c' )
92
92
if not exists (library ) or getmtime (sauce ) > getmtime (library ):
93
93
build = "gcc -fPIC -shared -o %s %s" % (library , sauce )
94
- assert os .system (build + " >/dev/null 2>&1" ) == 0
94
+ if (os .system (build + " >/dev/null 2>&1" ) != 0 ):
95
+ raise OSError ("GCC error" )
95
96
xterm256_c = ctypes .cdll .LoadLibrary (library )
96
97
xterm256_c .init ()
97
98
def xterm_to_rgb (xcolor ):
@@ -102,5 +103,5 @@ def xterm_to_rgb(xcolor):
102
103
103
104
try :
104
105
(rgb_to_xterm , xterm_to_rgb ) = compile_speedup ()
105
- except :
106
+ except OSError :
106
107
logging .debug ("fabulous failed to compile xterm256 speedup code" )
You can’t perform that action at this time.
0 commit comments