projects
/
sitecorepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0096d8
)
Fixes to GRADUATION_REGEXP in export_mysql
author
W. Trevor King
<wking@drexel.edu>
Sat, 26 Jun 2010 22:00:25 +0000
(18:00 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Sat, 26 Jun 2010 22:00:59 +0000
(18:00 -0400)
sitecore/prof/export_mysql.py
patch
|
blob
|
history
diff --git
a/sitecore/prof/export_mysql.py
b/sitecore/prof/export_mysql.py
index d0227169a9537a3793c4a63e3949e2a55b9c263f..3fa9e6fbfea2fc00a3ef6b2bd153263fddd385ed 100644
(file)
--- a/
sitecore/prof/export_mysql.py
+++ b/
sitecore/prof/export_mysql.py
@@
-33,7
+33,7
@@
from .. import get_logger
from . import Name, Graduation, Contact, Bio, Professor
-GRADUATION_REGEXP = re.compile('^(\S
) +(\S), (.*) *(\d)?
$')
+GRADUATION_REGEXP = re.compile('^(\S
*) +(\S*), (\D*) *(\d*)
$')
"""Examples:
M.S. Physics, University of Calcutta, Calcutta, India
@@
-178,6
+178,8
@@
Where the relevant categories are
m = GRADUATION_REGEXP.match(degree)
assert m != None, 'Misformed graduation: %s' % degree
title,field,college,year = m.groups()
+ if year == '':
+ year = None
p.graduations.append(
Graduation(
college=college,