[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - config.py:1.3
Fred L. Drake, Jr.
fred at zope.com
Fri Mar 12 14:19:49 EST 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv7587
Modified Files:
config.py
Log Message:
change the path for the default configuration file:
- the filename is now the same on all platforms (though the directory
name differs)
- there's a directory specifically for configuration data, since we
can reasonalby expect that some repository maps may be placed in the
directory with the config file
=== Packages/zpkgtools/zpkgtools/config.py 1.2 => 1.3 ===
--- Packages/zpkgtools/zpkgtools/config.py:1.2 Thu Mar 11 09:55:50 2004
+++ Packages/zpkgtools/zpkgtools/config.py Fri Mar 12 14:19:41 2004
@@ -62,7 +62,7 @@
p = cfgparser.Parser(f, path, SCHEMA)
cf = p.load()
for value in cf.repository_map:
- if value is None:
+ if not value:
raise ValueError("'repository-map' requires a location")
type, rest = urllib.splittype(value)
if not type:
@@ -77,10 +77,10 @@
This returns different things for Windows and POSIX systems.
"""
+ zpkgdir = "zpkg"
if os.name == "posix":
- name = "~/.zpkgrc"
- else:
- name = os.path.join("~", "zpkg.conf")
+ zpkgdir = "." + zpkgdir
+ name = os.path.join("~", zpkgdir, "zpkg.conf")
path = os.path.expanduser(name)
if os.path.exists(path):
path = os.path.realpath(path)
More information about the Zope-CVS
mailing list