Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG-RAN
Commits
f7099ef9
Commit
f7099ef9
authored
Nov 11, 2015
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed a bug in search/replace python script
parent
75e6b8bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
cmake_targets/autotests/tools/search_repl.py
cmake_targets/autotests/tools/search_repl.py
+4
-4
No files found.
cmake_targets/autotests/tools/search_repl.py
100644 → 100755
View file @
f7099ef9
...
...
@@ -22,12 +22,12 @@ if keyword == 'mme_ip_address':
#string = (re.sub(r"mme_ip_address\s*=\s*\([^\$]+)\)\s*;\s*", r"<% tex \1 %>", t, re.M)
replacement_text
=
keyword
+
' = ( { '
+
replacement_text
+
' } ) ; '
string
=
re
.
sub
(
r"mme_ip_address\s*=\s*\(([^\$]+?)\)\s*;"
,
replacement_text
,
string
,
re
.
M
)
el
if
keyword
==
'N_RB_DL'
:
el
se
:
replacement_text
=
keyword
+
' = '
+
replacement_text
+
' ; '
string
=
re
.
sub
(
r"%s\s*=\s*([^\$]+?)\s*;"
%
keyword
,
replacement_text
,
string
,
re
.
M
)
else
:
replacement_text
=
keyword
+
' =
\"
'
+
replacement_text
+
'
\"
; '
string
=
re
.
sub
(
r"%s\s*=\s*\"([^\$]+?)\"\s*;"
%
keyword
,
replacement_text
,
string
,
re
.
M
)
#
else :
# replacement_text = keyword + ' =\"
' + replacement_text + '\" ; '
#
string = re.sub(r"%s\s*=\s*\"([^\$]+?)\"\s*;" % keyword , replacement_text, string, re.M)
file
=
open
(
filename
,
'w'
)
file
.
write
(
string
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment