| skipped 767 lines |
768 | 768 | | # https://github.com/detro/ghostdriver/issues/334 |
769 | 769 | | # http://stackoverflow.com/questions/492519/timeout-on-a-function-call |
770 | 770 | | if self.debug: print('Looks like phantomjs has hung.') |
771 | | - | @self.phantomjs_quit_timeout |
772 | | - | def phantomjs_quit_session(): |
| 771 | + | try: |
773 | 772 | | self.quit_session(phantomjs_short_timeout_decorator=self.phantomjs_quit_timeout) |
774 | | - | phantomjs_quit_session() |
| 773 | + | except Exception as e: |
| 774 | + | if self.debug: print(e) |
775 | 775 | | self.open_session() |
776 | 776 | | |
777 | 777 | | def phantomjs_quit_hang_handler(self, signum, frame): |
| skipped 52 lines |