Fixed 20613 - moved pickle loads/dumps outside with self._lock.reader()/... #1296

Merged
merged 1 commit into from Jul 7, 2013

Projects

None yet

3 participants

@ersran9

...writer() blocks

@ersran9

On a second read - are you saying that pickled might not be defined because code does not enter the with block and then the ' if exp is None or exp > time.time() ' becomes true? I guess I can apply the NameError thing in this case too. Sorry for the confusion.

ersran9 Fixed 20613 - moved pickle loads/dumps outside with self._lock.reader…
…()/writer() blocks

Additionaly added pickled=None initially and check for none before
returning in get
76ee39c
@jaap3

Looks good, I have to admit that I was wrong about my undefined variable concern. I parsed the code wrong in my head. In my defense, this way makes it more comprehensible anyway ;) Thank you!

@alex alex merged commit 76ee39c into django:master Jul 7, 2013
@ersran9 ersran9 deleted the ersran9:ticket_20613 branch Jul 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment