[Checkins] SVN: cc.gettext/trunk/ Create target mo_path if it does
not already exist.
Nathan Yergler
nathan at yergler.net
Wed Aug 1 17:21:49 EDT 2007
Log message for revision 78533:
Create target mo_path if it does not already exist.
Changed:
U cc.gettext/trunk/CHANGES.txt
U cc.gettext/trunk/README.txt
U cc.gettext/trunk/cc/gettext/__init__.py
U cc.gettext/trunk/setup.py
-=-
Modified: cc.gettext/trunk/CHANGES.txt
===================================================================
--- cc.gettext/trunk/CHANGES.txt 2007-08-01 21:10:01 UTC (rev 78532)
+++ cc.gettext/trunk/CHANGES.txt 2007-08-01 21:21:49 UTC (rev 78533)
@@ -1,5 +1,10 @@
+0.5.1
+=====
+
+Attempt to create the mo_path if it does not exist.
+
0.5
===
Modified: cc.gettext/trunk/README.txt
===================================================================
--- cc.gettext/trunk/README.txt 2007-08-01 21:10:01 UTC (rev 78532)
+++ cc.gettext/trunk/README.txt 2007-08-01 21:21:49 UTC (rev 78533)
@@ -22,3 +22,6 @@
The base file path (relative to the buildout base or absolute) where
compiled .mo files are written. Compiled files are named using the
pattern <mo_path>/<locale>/LC_MESSAGES/<domain>.mo
+
+ If the specified path does not exist, the recipe will attempt to create
+ it.
Modified: cc.gettext/trunk/cc/gettext/__init__.py
===================================================================
--- cc.gettext/trunk/cc/gettext/__init__.py 2007-08-01 21:10:01 UTC (rev 78532)
+++ cc.gettext/trunk/cc/gettext/__init__.py 2007-08-01 21:21:49 UTC (rev 78533)
@@ -91,12 +91,11 @@
raise zc.buildout.UserError("Invalid path.")
if not(os.path.exists(options['mo_path'])):
- logging.getLogger(name).error(
- "Specified mo_path %s does not exist.",
+ logging.getLogger(name).warn(
+ "Specified mo_path %s does not exist; attempting to create.",
options['mo_path'])
+ os.makedirs(options['mo_path'])
- raise zc.buildout.UserError("Invalid path.")
-
def install(self):
"""Scan the po_path for .po files and compile them using msgfmt."""
Modified: cc.gettext/trunk/setup.py
===================================================================
--- cc.gettext/trunk/setup.py 2007-08-01 21:10:01 UTC (rev 78532)
+++ cc.gettext/trunk/setup.py 2007-08-01 21:21:49 UTC (rev 78533)
@@ -22,7 +22,7 @@
setup(
name = "cc.gettext",
- version = "0.5",
+ version = "0.5.1",
packages = find_packages('.'),
# scripts and dependencies
More information about the Checkins
mailing list