Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
1525ae5f
Commit
1525ae5f
authored
4 years ago
by
Kendrick, Coleman
Browse files
Options
Downloads
Patches
Plain Diff
Fix cache setting for diffraction reduction gui
parent
e55d7a78
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/Interface/reduction_gui/reduction/diffraction/diffraction_adv_setup_script.py
+10
-5
10 additions, 5 deletions
...gui/reduction/diffraction/diffraction_adv_setup_script.py
with
10 additions
and
5 deletions
scripts/Interface/reduction_gui/reduction/diffraction/diffraction_adv_setup_script.py
+
10
−
5
View file @
1525ae5f
...
...
@@ -83,7 +83,7 @@ class AdvancedSetupScript(BaseScriptElement):
def
cache_dir
(
self
):
"""
Passing all three candidates back as one list
"""
# A comma ',' is used here since it is the default delimiter in mantid
return
"
,
"
.
join
(
self
.
cache_dir_scan_save
,
self
.
cache_dir_scan_1
,
self
.
cache_dir_scan_2
)
return
self
.
cache_dir_scan_save
+
"
,
"
+
self
.
cache_dir_scan_1
+
"
,
"
+
self
.
cache_dir_scan_2
def
__init__
(
self
,
inst_name
):
"""
Initialization
...
...
@@ -179,7 +179,7 @@ class AdvancedSetupScript(BaseScriptElement):
pardict
[
"
SampleNumberDensity
"
]
=
self
.
samplenumberdensity
pardict
[
"
ContainerShape
"
]
=
self
.
containershape
#Caching options
pardict
[
'
CacheDir
'
]
=
"
;
"
.
join
(
self
.
cache_dir
)
pardict
[
'
CacheDir
'
]
=
self
.
cache_dir
pardict
[
'
CleanCache
'
]
=
str
(
int
(
self
.
clean_cache
))
return
pardict
...
...
@@ -195,7 +195,7 @@ class AdvancedSetupScript(BaseScriptElement):
# special map for bool type
value
=
'
1
'
if
value
else
'
0
'
else
:
value
=
"
;
"
.
join
(
self
.
cache_dir
)
if
keyname
==
"
CacheDir
"
else
str
(
value
)
value
=
str
(
value
)
xml
+=
f
"
<
{
keyname
.
lower
()
}
>
{
value
}
</
{
keyname
.
lower
()
}
>
\n
"
xml
+=
"
</AdvancedSetup>
\n
"
...
...
@@ -288,8 +288,13 @@ class AdvancedSetupScript(BaseScriptElement):
# Caching options
# split it into the three cache dirs
# NOTE: there should only be three entries, if not, let it fail early
self
.
cache_dir_scan_save
,
self
.
cache_dir_scan_1
,
self
.
cache_dir_scan_2
=
BaseScriptElement
.
getStringElement
(
instrument_dom
,
'
cachedir
'
,
default
=
"
;;
"
).
split
(
"
;
"
)
try
:
self
.
cache_dir_scan_save
,
self
.
cache_dir_scan_1
,
self
.
cache_dir_scan_2
=
BaseScriptElement
.
getStringElement
(
instrument_dom
,
'
cachedir
'
,
default
=
"
,,
"
).
split
(
"
,
"
)
except
ValueError
:
self
.
cache_dir_scan_save
=
''
self
.
cache_dir_scan_1
=
''
self
.
cache_dir_scan_2
=
''
tempbool
=
BaseScriptElement
.
getStringElement
(
instrument_dom
,
"
cleancache
"
,
...
...
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