[GRASS-SVN] r55231 - grass/trunk/lib/python/script
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Feb 26 03:24:06 PST 2013
Author: wenzeslaus
Date: 2013-02-26 03:24:06 -0800 (Tue, 26 Feb 2013)
New Revision: 55231
Modified:
grass/trunk/lib/python/script/core.py
Log:
Added comment to legal_name function
Modified: grass/trunk/lib/python/script/core.py
===================================================================
--- grass/trunk/lib/python/script/core.py 2013-02-26 11:22:50 UTC (rev 55230)
+++ grass/trunk/lib/python/script/core.py 2013-02-26 11:24:06 UTC (rev 55231)
@@ -1400,9 +1400,15 @@
_debug_level = int(gisenv().get('DEBUG', 0))
def legal_name(s):
+ """!Checks if the string contains only allowed characters.
+
+ This is the Python implementation of G_legal_filename() function.
+
+ @note It is not clear when to use this function.
+ """
if not s or s[0] == '.':
- warning(_("Illegal filename <%s>. Cannot be 'NULL' or start with '.'.") % s)
- return False
+ warning(_("Illegal filename <%s>. Cannot be 'NULL' or start with '.'.") % s)
+ return False
illegal = [c
for c in s
More information about the grass-commit
mailing list