Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ideascube
ARCHIVED Kiwix Hotspot
Commits
f194f8c2
Commit
f194f8c2
authored
Oct 27, 2018
by
rgaudin
Browse files
Fixed
#254
: on windows, tempfile needs to be created with delete=False to be used via its name
parent
350e8956
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
f194f8c2
2.0-rc4
* Fixed clean cache regression
* Fixed PermissionError on QEMU phase One
* Safer JSON import
2.0-rc13
* Updated Wikifundi language packs (2018-10-24)
* Fixed latex in WikiFundi
...
...
kiwix-hotspot/backend/ansiblecube.py
View file @
f194f8c2
...
...
@@ -191,7 +191,7 @@ def run_phase_one(machine, extra_vars, secret_keys, logo=None, favicon=None, css
# save YAML catalogs into local files inside VM for use by ideascube
for
index
,
catalog
in
enumerate
(
CATALOGS
):
with
tempfile
.
NamedTemporaryFile
(
suffix
=
".yml"
)
as
fd
:
with
tempfile
.
NamedTemporaryFile
(
suffix
=
".yml"
,
delete
=
False
)
as
fd
:
yaml
.
safe_dump
(
get_catalogs
(
machine
.
_logger
)[
index
],
fd
,
...
...
@@ -200,6 +200,7 @@ def run_phase_one(machine, extra_vars, secret_keys, logo=None, favicon=None, css
encoding
=
"utf-8"
,
)
machine
.
put_file
(
fd
.
name
,
catalog
[
"local_url"
].
replace
(
"file://"
,
""
))
os
.
unlink
(
fd
.
name
)
run
(
machine
,
tags
,
extra_vars
,
secret_keys
)
...
...
kiwix-hotspot/backend/util.py
View file @
f194f8c2
...
...
@@ -174,7 +174,7 @@ class EtcherWriterThread(threading.Thread):
# on macOS, GUI sudo captures stdout so we use a log file
log_to_file
=
not
from_cli
and
sys
.
platform
==
"darwin"
if
log_to_file
:
log_file
=
tempfile
.
NamedTemporaryFile
(
suffix
=
".log"
)
log_file
=
tempfile
.
NamedTemporaryFile
(
suffix
=
".log"
,
delete
=
False
)
cmd
=
[
os
.
path
.
join
(
data
.
data_dir
,
"etcher-cli"
,
"etcher"
),
...
...
@@ -215,6 +215,7 @@ class EtcherWriterThread(threading.Thread):
if
log_to_file
:
log_file
.
close
()
os
.
unlink
(
log_file
)
try
:
logger
.
std
(
". has process exited?"
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment