From e9535e3a0eccea0164d15150afe3fafab532fb82 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Thu, 26 Apr 2007 18:25:56 +0000 Subject: [PATCH] - allow capital letters in slice names --- PLC/Methods/AddSlice.py | 4 ++-- PLC/Slices.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PLC/Methods/AddSlice.py b/PLC/Methods/AddSlice.py index 9567c093..56425196 100644 --- a/PLC/Methods/AddSlice.py +++ b/PLC/Methods/AddSlice.py @@ -42,11 +42,11 @@ class AddSlice(Method): slice_fields = dict(filter(can_update, slice_fields.items())) # 1. Lowercase. - # 2. Begins with login_base (only letters). + # 2. Begins with login_base (letters or numbers). # 3. Then single underscore after login_base. # 4. Then letters, numbers, or underscores. name = slice_fields['name'] - good_name = r'^[a-z0-9]+_[a-z0-9_]+$' + good_name = r'^[a-z0-9]+_[a-zA-Z0-9_]+$' if not name or \ not re.match(good_name, name): raise PLCInvalidArgument, "Invalid slice name" diff --git a/PLC/Slices.py b/PLC/Slices.py index c8f6e812..d3b6f786 100644 --- a/PLC/Slices.py +++ b/PLC/Slices.py @@ -61,7 +61,7 @@ class Slice(Row): # 2. Begins with login_base (letters or numbers). # 3. Then single underscore after login_base. # 4. Then letters, numbers, or underscores. - good_name = r'^[a-z0-9]+_[a-z0-9_]+$' + good_name = r'^[a-z0-9]+_[a-zA-Z0-9_]+$' if not name or \ not re.match(good_name, name): raise PLCInvalidArgument, "Invalid slice name" -- 2.47.0