[Python-checkins] python/dist/src/Modules cPickle.c,2.138,2.139
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Tue, 18 Feb 2003 12:50:48 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv29179/python/Modules
Modified Files:
cPickle.c
Log Message:
save_global(): Trying to resolve module.name can fail for two
reasons: importing module can fail, or the attribute lookup
module.name can fail. We were giving the same error msg for
both cases, making it needlessly hard to guess what went wrong.
These cases give different error msgs now.
Index: cPickle.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
retrieving revision 2.138
retrieving revision 2.139
diff -C2 -d -r2.138 -r2.139
*** cPickle.c 15 Feb 2003 15:07:17 -0000 2.138
--- cPickle.c 18 Feb 2003 20:50:45 -0000 2.139
***************
*** 2022,2027 ****
if (mod == NULL) {
cPickle_ErrFormat(PicklingError,
! "Can't pickle %s: it's not found as %s.%s",
! "OSS", args, module, global_name);
goto finally;
}
--- 2022,2028 ----
if (mod == NULL) {
cPickle_ErrFormat(PicklingError,
! "Can't pickle %s: import of module %s "
! "failed",
! "OS", args, module);
goto finally;
}
***************
*** 2029,2033 ****
if (klass == NULL) {
cPickle_ErrFormat(PicklingError,
! "Can't pickle %s: it's not found as %s.%s",
"OSS", args, module, global_name);
goto finally;
--- 2030,2035 ----
if (klass == NULL) {
cPickle_ErrFormat(PicklingError,
! "Can't pickle %s: attribute lookup %s.%s "
! "failed",
"OSS", args, module, global_name);
goto finally;