Page Menu
Home
VyOS Platform
Search
Configure Global Search
Log In
Files
F119063184
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/helpers/validate-value.py b/src/helpers/validate-value.py
index d702739b5..36f996d38 100755
--- a/src/helpers/validate-value.py
+++ b/src/helpers/validate-value.py
@@ -1,43 +1,43 @@
#!/usr/bin/env python3
import re
import os
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--regex', action='append')
parser.add_argument('--exec', action='append')
parser.add_argument('--value', action='store')
args = parser.parse_args()
debug = False
# Multiple arguments work like logical OR
try:
for r in args.regex:
if re.fullmatch(r, args.value):
sys.exit(0)
except Exception as exn:
if debug:
print(exn)
- else:
+ else:
pass
try:
for cmd in args.exec:
cmd = "{0} {1}".format(cmd, args.value)
if debug:
print(cmd)
res = os.system(cmd)
if res == 0:
sys.exit(0)
except Exception as exn:
if debug:
print(exn)
else:
pass
sys.exit(1)
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Nov 6, 8:07 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4646022
Default Alt Text
(1 KB)
Attached To
Mode
rVYOSONEX vyos-1x
Attached
Detach File
Event Timeline
Log In to Comment