Commit cec2d220 authored by Vadim Markovtsev's avatar Vadim Markovtsev Committed by Frank Chen
Browse files

Fix unpickling/copying tf.app.flags.FLAGS (#11437)

pickle.load() and copy.copy() check for the presence of  __setstate__().
The problem is that this check is made in the freshly allocated instance which
has not been __init__()-ed. Thus it's __dict__ is completely empty and
__getattr__() fail with KeyError.

The fix is to check if __parsed is in the __dict__ and raise
AttributeError if it isn't.
parent b7ed2bcb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment