summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-06-19 20:14:05 +0200
committermathieui <mathieui@mathieui.net>2013-06-19 12:16:28 +0200
commitd269617788e96ed375a3b7ecf1e87d2f17b5e1b8 (patch)
tree8c758d9881a72cab200f2bc6e2c9be430f093945
parent732347b69d206b8984a659d5c25850e58a77afa9 (diff)
downloadpoezio-d269617788e96ed375a3b7ecf1e87d2f17b5e1b8.tar.gz
poezio-d269617788e96ed375a3b7ecf1e87d2f17b5e1b8.tar.bz2
poezio-d269617788e96ed375a3b7ecf1e87d2f17b5e1b8.tar.xz
poezio-d269617788e96ed375a3b7ecf1e87d2f17b5e1b8.zip
Revert 9eaffe1369f2be177576402f20edcd114a1eaa9d because of 3.1 compat
-rw-r--r--src/config.py2
-rw-r--r--src/logger.py7
-rw-r--r--src/plugin_manager.py4
-rw-r--r--src/theming.py2
4 files changed, 6 insertions, 9 deletions
diff --git a/src/config.py b/src/config.py
index 6b7e3864..34bbfe27 100644
--- a/src/config.py
+++ b/src/config.py
@@ -255,7 +255,7 @@ if not CONFIG_HOME:
CONFIG_PATH = path.join(CONFIG_HOME, 'poezio')
try:
- makedirs(CONFIG_PATH, exist_ok=True)
+ makedirs(CONFIG_PATH)
except OSError:
pass
diff --git a/src/logger.py b/src/logger.py
index 635f0985..7dffe6b5 100644
--- a/src/logger.py
+++ b/src/logger.py
@@ -56,17 +56,14 @@ class Logger(object):
return
directory = os.path.join(DATA_HOME, 'logs')
try:
- makedirs(directory, exist_ok=True)
+ makedirs(directory)
except OSError:
- import traceback
- log.debug('Cannot create log directory "%s":\n%s', directory, traceback.format_exc())
+ pass
try:
fd = open(os.path.join(directory, room), 'a')
self.fds[room] = fd
return fd
except IOError:
- import traceback
- log.debug('Cannot open logfile %s:\n%s', room, traceback.format_exc())
return
def get_logs(self, jid, nb=10):
diff --git a/src/plugin_manager.py b/src/plugin_manager.py
index 74d5a2d3..9e253f97 100644
--- a/src/plugin_manager.py
+++ b/src/plugin_manager.py
@@ -38,14 +38,14 @@ if not plugins_conf_dir:
plugins_conf_dir = os.path.expanduser(plugins_conf_dir)
try:
- os.makedirs(plugins_dir, exist_ok=True)
+ os.makedirs(plugins_dir)
except OSError:
pass
else:
load_path.append(plugins_dir)
try:
- os.makedirs(plugins_conf_dir, exist_ok=True)
+ os.makedirs(plugins_conf_dir)
except OSError:
pass
diff --git a/src/theming.py b/src/theming.py
index c26a4733..c999ef2c 100644
--- a/src/theming.py
+++ b/src/theming.py
@@ -372,7 +372,7 @@ def reload_theme():
'poezio', 'themes')
themes_dir = os.path.expanduser(themes_dir)
try:
- os.makedirs(themes_dir, exist_ok=True)
+ os.makedirs(themes_dir)
except OSError:
pass
theme_name = config.get('theme', 'default')