summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAuke Booij (tulcod) <auke@tulcod.com>2010-08-05 23:32:13 +0200
committerAuke Booij (tulcod) <auke@tulcod.com>2010-08-05 23:32:13 +0200
commit2726e50bfa02e0e52428fd0cdbfd10758e970a30 (patch)
tree6774e374c45da60bf216e2560d792624228ebd5b
parentTiny performance enhancments (diff)
downloadg-cran-2726e50bfa02e0e52428fd0cdbfd10758e970a30.tar.gz
g-cran-2726e50bfa02e0e52428fd0cdbfd10758e970a30.tar.bz2
g-cran-2726e50bfa02e0e52428fd0cdbfd10758e970a30.zip
Convert unwanted characters in CRAN package names to _ instead of empty
-rw-r--r--g_cran/cran_read.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/g_cran/cran_read.py b/g_cran/cran_read.py
index 1505806..4a1ef90 100644
--- a/g_cran/cran_read.py
+++ b/g_cran/cran_read.py
@@ -76,7 +76,7 @@ def pmsify_license_field(license_list):
def pmsify_package_name(name):
if len(name)==0:
raise RuntimeError('Empty package name')
- name=re.sub('[^a-zA-Z0-9+_-]','',name) #name may only contain these characters
+ name=re.sub('[^a-zA-Z0-9+_-]','_',name) #name may only contain these characters
if not re.match('[a-zA-Z0-9+_].*',name): #package name must start with [a-zA-Z0-9+_]
name='_'+name
if re.match('.*-[0-9]+',name): #package name may not end in hyphen followed by integer