Sections
Timeline
View Tickets
New Ticket
Sub-Sections
Download
Unified Diff
Zip Archive
Metanav
Preferences
About Trac
Links
Slowchop Studios
Gerald Kaszuba
Advertisement

Changeset 70

Show
Ignore:
Timestamp:
06/07/08 10:29:11 (5 months ago)
Author:
gak
Message:
  • #21 Fixes for calling itself
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pycallgraph.py

    r64 r70  
    255255        # Store the call information 
    256256        if keep: 
    257  
    258             fr = call_stack[-1] 
     257             
     258            if call_stack: 
     259                fr = call_stack[-1] 
     260            else: 
     261                fr = None 
    259262            if fr not in call_dict: 
    260263                call_dict[fr] = {} 
     
    279282        if call_stack: 
    280283            full_name = call_stack.pop(-1) 
    281             t = call_stack_timer.pop(-1) 
     284            if call_stack_timer: 
     285                t = call_stack_timer.pop(-1) 
     286            else: 
     287                t = None 
    282288            if t and time_filter(stack=call_stack, full_name=full_name): 
    283289                if full_name not in func_time: