Mercurial > hg > Applications > virsh-wrapper
changeset 20:07ef2fc111a2
allow other faculties' students.
author | k128568 |
---|---|
date | Mon, 10 Feb 2014 04:47:52 -1000 |
parents | 7b4cdb0c9a99 |
children | 13646e64d98b |
files | newvm.py |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/newvm.py Mon Feb 10 04:30:48 2014 -1000 +++ b/newvm.py Mon Feb 10 04:47:52 2014 -1000 @@ -14,7 +14,7 @@ # teachers/kono/01 # bad name returns 1 def ie_check_name(name): - m=re.match('^students/e(\d\d)/e(\d\d)57\d\d/0[1-4]$',name) + m=re.match('^students/e(\d\d)/e(\d\d)5\d\d\d/0[1-4]$',name) if m is not None: if m.group(1)==m.group(2): return 0 @@ -22,8 +22,6 @@ return 1 elif re.match('^teachers/[-a-z0-9]+/0[1-4]$',name): return 0 - elif re.match('^(taiki)/0[1-4]$',name): - return 0 else: return 1 @@ -37,11 +35,9 @@ os.makedirs(name); def ie_mkdir(name): - m=re.match('^(students/e\d\d/e\d\d57\d\d)/0[1-4]$',name) + m=re.match('^(students/e\d\d/e\d\d5\d\d\d)/0[1-4]$',name) if m is None: m=re.match('^(teachers/[-a-z0-9]+)/0[1-4]$',name) - if m is None: - m=re.match('(taiki)/0[1-4]',name) if m is not None: dir=m.group(1) ie_mkdir1('/media/fcs/'+dir)