summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--WebappConfig/config.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/WebappConfig/config.py b/WebappConfig/config.py
index 6c915c3..3a176a0 100644
--- a/WebappConfig/config.py
+++ b/WebappConfig/config.py
@@ -996,17 +996,20 @@ class Config:
OUT.die('Invalid package name')
if len(args) > 1:
- argsvr = args[1].split('.')
- if len(argsvr) == 1:
- OUT.die('Invalid package version: %(pvr)s'
+ pvr = args[1]
+ has_int = False # A package version should have at least one
+ # numerical value, but we want to allow for
+ # the flexibility of having any alphanumeric
+ # value while checking to make sure it's sane.
+
+ for char in pvr:
+ if char.isdigit():
+ has_int = True
+
+ if not has_int:
+ OUT.die('Invalid package version: "%(pvr)s"'
% {'pvr': args[1]})
- pvr = ''
- for i in range(0, len(argsvr)):
- if not i == len(argsvr) - 1:
- pvr += argsvr[i] + '.'
- else:
- pvr += argsvr[i]
self.config.set('USER', 'pvr', pvr)
if (not options['dir'] and