27 lines
826 B
Diff
27 lines
826 B
Diff
From 7c6b91b1c32fe502d1a6ffc3e29f09481bcf7ab1 Mon Sep 17 00:00:00 2001
|
|
From: Jiri Popelka <jpopelka@redhat.com>
|
|
Date: Mon, 8 Feb 2016 13:42:41 +0100
|
|
Subject: [PATCH 1/2] Make sure tempdir is created even in offline mode.
|
|
|
|
---
|
|
src/firewall/functions.py | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/src/firewall/functions.py b/src/firewall/functions.py
|
|
index 9b19139..6dbac26 100644
|
|
--- a/src/firewall/functions.py
|
|
+++ b/src/firewall/functions.py
|
|
@@ -265,6 +265,9 @@ def firewalld_is_active():
|
|
|
|
def tempFile():
|
|
try:
|
|
+ if not os.path.exists(FIREWALLD_TEMPDIR):
|
|
+ os.mkdir(FIREWALLD_TEMPDIR, 0o750)
|
|
+
|
|
return tempfile.NamedTemporaryFile(mode='wt', prefix="temp.",
|
|
dir=FIREWALLD_TEMPDIR, delete=False)
|
|
except Exception as msg:
|
|
--
|
|
2.5.0
|
|
|