Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
The Gitlab server is succesfully updated to version 17.9.2
Show more breadcrumbs
toolbox
WindEnergyToolbox
Commits
879fbf59
Commit
879fbf59
authored
7 years ago
by
Mads M. Pedersen
Committed by
David Verelst
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
striping comments in htcfile to avoid appending tabs during open-save procedure
parent
4b030ae2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
wetb/hawc2/htc_contents.py
+4
-4
4 additions, 4 deletions
wetb/hawc2/htc_contents.py
wetb/hawc2/htc_file.py
+1
-0
1 addition, 0 deletions
wetb/hawc2/htc_file.py
with
5 additions
and
4 deletions
wetb/hawc2/htc_contents.py
+
4
−
4
View file @
879fbf59
...
@@ -133,8 +133,8 @@ class HTCSection(HTCContents):
...
@@ -133,8 +133,8 @@ class HTCSection(HTCContents):
begin_comments
=
""
begin_comments
=
""
def
__init__
(
self
,
name
,
begin_comments
=
""
,
end_comments
=
""
):
def
__init__
(
self
,
name
,
begin_comments
=
""
,
end_comments
=
""
):
self
.
name_
=
name
self
.
name_
=
name
self
.
begin_comments
=
begin_comments
self
.
begin_comments
=
begin_comments
.
strip
(
"
\t
"
)
self
.
end_comments
=
end_comments
self
.
end_comments
=
end_comments
.
strip
(
"
\t
"
)
self
.
contents
=
OrderedDict
()
self
.
contents
=
OrderedDict
()
@staticmethod
@staticmethod
...
@@ -174,7 +174,7 @@ class HTCLine(HTCContents):
...
@@ -174,7 +174,7 @@ class HTCLine(HTCContents):
name
=
name
[:
name
.
index
(
"
__
"
)]
name
=
name
[:
name
.
index
(
"
__
"
)]
self
.
name_
=
name
self
.
name_
=
name
self
.
values
=
list
(
values
)
self
.
values
=
list
(
values
)
self
.
comments
=
comments
self
.
comments
=
comments
.
strip
(
"
\t
"
)
def
__repr__
(
self
):
def
__repr__
(
self
):
return
str
(
self
)
return
str
(
self
)
...
@@ -228,7 +228,7 @@ class HTCOutputSection(HTCSection):
...
@@ -228,7 +228,7 @@ class HTCOutputSection(HTCSection):
def
line_from_line
(
self
,
lines
):
def
line_from_line
(
self
,
lines
):
while
lines
[
0
].
strip
()
==
""
:
while
len
(
lines
)
and
lines
[
0
].
strip
()
==
""
:
lines
.
pop
(
0
)
lines
.
pop
(
0
)
name
=
lines
[
0
].
split
()[
0
].
strip
()
name
=
lines
[
0
].
split
()[
0
].
strip
()
if
name
in
[
'
filename
'
,
'
data_format
'
,
'
buffer
'
,
'
time
'
]:
if
name
in
[
'
filename
'
,
'
data_format
'
,
'
buffer
'
,
'
time
'
]:
...
...
This diff is collapsed.
Click to expand it.
wetb/hawc2/htc_file.py
+
1
−
0
View file @
879fbf59
...
@@ -334,6 +334,7 @@ class HTCFile(HTCContents, HTCDefaults):
...
@@ -334,6 +334,7 @@ class HTCFile(HTCContents, HTCDefaults):
exe_file
=
os
.
path
.
join
(
self
.
modelpath
,
exe
)
exe_file
=
os
.
path
.
join
(
self
.
modelpath
,
exe
)
#print (from_unix(getmtime(res_file)), from_unix(getmtime(htc_file)))
#print (from_unix(getmtime(res_file)), from_unix(getmtime(htc_file)))
if
(
isfile
(
htc_file
)
and
isfile
(
res_file
)
and
isfile
(
exe_file
)
and
if
(
isfile
(
htc_file
)
and
isfile
(
res_file
)
and
isfile
(
exe_file
)
and
str
(
HTCFile
(
htc_file
))
==
str
(
self
)
and
getmtime
(
res_file
)
>
getmtime
(
htc_file
)
and
getmtime
(
res_file
)
>
getmtime
(
exe_file
)):
getmtime
(
res_file
)
>
getmtime
(
htc_file
)
and
getmtime
(
res_file
)
>
getmtime
(
exe_file
)):
if
""
.
join
(
self
.
readfilelines
(
htc_file
))
==
str
(
self
):
if
""
.
join
(
self
.
readfilelines
(
htc_file
))
==
str
(
self
):
return
return
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment