P
Pete Bartonly
Quick question, probably quite a simple matter. Take the follow start of
a method:
def review(filesNeedingReview):
for item in filesNeedingReview:
(tightestOwner, logMsg) = item
if (logMsg != None):
for logInfo in logMsg.changed_paths:
This generates the error:
UnboundLocalError: local variable 'logMsg' referenced before assignment
I thought I'd assigned it in the "(tightestOwner, logMsg) = item" line -
so in the python interpreter complaining about the fact this assignment
might not go well?
Thanks!
a method:
def review(filesNeedingReview):
for item in filesNeedingReview:
(tightestOwner, logMsg) = item
if (logMsg != None):
for logInfo in logMsg.changed_paths:
This generates the error:
UnboundLocalError: local variable 'logMsg' referenced before assignment
I thought I'd assigned it in the "(tightestOwner, logMsg) = item" line -
so in the python interpreter complaining about the fact this assignment
might not go well?
Thanks!