changeset 94:abb3952c2209

minor refactoring
author Atul Varma <varmaa@toolness.com>
date Fri, 01 May 2009 21:33:57 -0700
parents 3be28af79baf
children 57681224a62a
files cosocket.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/cosocket.py	Fri May 01 18:53:07 2009 -0700
+++ b/cosocket.py	Fri May 01 21:33:57 2009 -0700
@@ -91,13 +91,10 @@
         except Exception:
             self.log_info(traceback.format_exc(), 'error')
 
-    def get_coroutine_stack_frames(self):
-        return [coroutine.gi_frame
-                for coroutine in self.__coroutine_stack]
-
     def get_formatted_coroutine_traceback(self):
         lines = ['Coroutine traceback (most recent call last):']
-        for frame in self.get_coroutine_stack_frames():
+        for frame in [coroutine.gi_frame
+                      for coroutine in self.__coroutine_stack]:
             name = frame.f_code.co_name
             filename = frame.f_code.co_filename
             lineno = frame.f_lineno