Show More
@@ -488,9 +488,9 class ui(object): | |||||
488 |
|
488 | |||
489 | def flush(self): |
|
489 | def flush(self): | |
490 | try: self.fout.flush() |
|
490 | try: self.fout.flush() | |
491 | except: pass |
|
491 | except (IOError, ValueError): pass | |
492 | try: self.ferr.flush() |
|
492 | try: self.ferr.flush() | |
493 | except: pass |
|
493 | except (IOError, ValueError): pass | |
494 |
|
494 | |||
495 | def interactive(self): |
|
495 | def interactive(self): | |
496 | '''is interactive input allowed? |
|
496 | '''is interactive input allowed? |
@@ -762,7 +762,7 def mktempcopy(name, emptyok=False, crea | |||||
762 | ofp.close() |
|
762 | ofp.close() | |
763 | except: |
|
763 | except: | |
764 | try: os.unlink(temp) |
|
764 | try: os.unlink(temp) | |
765 | except: pass |
|
765 | except OSError: pass | |
766 | raise |
|
766 | raise | |
767 | return temp |
|
767 | return temp | |
768 |
|
768 |
@@ -47,7 +47,7 class ProxyHandler (BaseHTTPServer.BaseH | |||||
47 | try: soc.connect(host_port) |
|
47 | try: soc.connect(host_port) | |
48 | except socket.error, arg: |
|
48 | except socket.error, arg: | |
49 | try: msg = arg[1] |
|
49 | try: msg = arg[1] | |
50 | except: msg = arg |
|
50 | except (IndexError, TypeError): msg = arg | |
51 | self.send_error(404, msg) |
|
51 | self.send_error(404, msg) | |
52 | return 0 |
|
52 | return 0 | |
53 | return 1 |
|
53 | return 1 |
General Comments 0
You need to be logged in to leave comments.
Login now