[pywin32-checkins] pywin32/com/win32com/client gencache.py,1.22,1.23
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: <mha...@us...> - 2003-10-31 03:04:06
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client
In directory sc8-pr-cvs1:/tmp/cvs-serv19480
Modified Files:
gencache.py
Log Message:
We would fail is the __gen_path__ directory didn't exist (as we decided we
were readonly). Now use the same semantics as we use for the rest of the
.zip support.
Index: gencache.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/gencache.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** gencache.py 6 Oct 2003 13:12:46 -0000 1.22
--- gencache.py 31 Oct 2003 03:04:02 -0000 1.23
***************
*** 39,43 ****
# There is no reason we *must* be readonly in a .zip, but we are now,
# and we really do need a "read-only" concept anyway.
! is_readonly = not os.path.isdir(os.path.dirname(win32com.__gen_path__))
# A dictionary of ITypeLibrary objects for demand generation explicitly handed to us
--- 39,45 ----
# There is no reason we *must* be readonly in a .zip, but we are now,
# and we really do need a "read-only" concept anyway.
! # We don't want to use isdir() though, as we have always gracefully
! # created this directory when we could.
! is_readonly = win32com.__gen_path__.find(".zip\\") >= 0
# A dictionary of ITypeLibrary objects for demand generation explicitly handed to us
***************
*** 105,108 ****
--- 107,111 ----
Checks the directory is OK.
"""
+ assert not is_readonly, "Why do you want the genpath for a readonly store?"
try:
os.makedirs(win32com.__gen_path__)
|