[GRASS-SVN] r59180 - grass/trunk/lib/python/pygrass
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Mar 3 07:58:02 PST 2014
Author: zarch
Date: 2014-03-03 07:58:02 -0800 (Mon, 03 Mar 2014)
New Revision: 59180
Modified:
grass/trunk/lib/python/pygrass/functions.py
Log:
rm utf-8 charaters in the is_clean_name function
Modified: grass/trunk/lib/python/pygrass/functions.py
===================================================================
--- grass/trunk/lib/python/pygrass/functions.py 2014-03-03 14:49:05 UTC (rev 59179)
+++ grass/trunk/lib/python/pygrass/functions.py 2014-03-03 15:58:02 UTC (rev 59180)
@@ -153,16 +153,15 @@
>>> is_clean_name('census')
True
>>> is_clean_name('0census')
- False
+ True
>>> is_clean_name('census&')
False
+ >>> is_clean_name('cénsus')
+ False
"""
- if name[0].isdigit():
+ if libgis.G_legal_filename(name) < 0:
return False
- for char in u' @#^?°,;%&/':
- if name.find(char) != -1:
- return False
return True
More information about the grass-commit
mailing list