Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
srcs
larsoft
bin
RemoveUserFromServiceConfig.py
Go to the documentation of this file.
1
#!/usr/bin/env python2
2
3
import
sys, re
4
5
import
SerialSubstitution
6
from
SerialSubstitution
import
AddProcessor, RunSubstitutor
7
8
9
################################################################################
10
if
__name__ ==
"__main__"
:
11
12
#############################################################################
13
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
14
# All files (no file selection)
15
#
16
Subst =
AddProcessor
(
SerialSubstitution.ProcessorClass
(
"FHiCL"
))
17
18
Subst.AddRegExRemoveLine(
r"\s*user\s*:\s*\{\s*\}\s*"
)
19
Subst.AddRegExPattern (
r"user:(\s+)@local::"
,
r" \1@table::"
)
20
Subst.AddRegExPattern (
r"user:(\s+)\{\s*(.*)\s*\}\s*"
,
r"\2"
)
21
Subst.AddSimplePattern (
"services.user."
,
"services."
)
22
23
Subst.AddWarningPattern (
r"user\s*:"
,
"Manual intervention may be required"
)
24
25
26
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
27
#############################################################################
28
29
sys.exit(
RunSubstitutor
())
30
#
SerialSubstitution.ProcessorClass
Definition:
SerialSubstitution.py:193
SerialSubstitution.AddProcessor
def AddProcessor
Definition:
SerialSubstitution.py:489
SerialSubstitution.RunSubstitutor
def RunSubstitutor
Definition:
SerialSubstitution.py:503
Generated by
1.8.5