[gnome-news] fix scope of CACHE_PATH constant introduced by 7236f05
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-news] fix scope of CACHE_PATH constant introduced by 7236f05
- Date: Tue, 31 May 2016 08:30:42 +0000 (UTC)
commit b9b6d12aeeeff49c213221208e8e74764e465591
Author: Felipe Borges <felipeborges gnome org>
Date: Tue May 31 10:27:05 2016 +0200
fix scope of CACHE_PATH constant introduced by 7236f05
Also sanitizes "mode" param for GLib.mkdir_with_parents
gnomenews/application.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnomenews/application.py b/gnomenews/application.py
index 98a94e4..76a5452 100644
--- a/gnomenews/application.py
+++ b/gnomenews/application.py
@@ -17,6 +17,8 @@
from gi.repository import Gtk, GLib, Gio, Gdk
from gettext import gettext as _
+CACHE_PATH = GLib.get_user_cache_dir()
+
from gnomenews import log
from gnomenews.window import Window
from gnomenews.about import AboutDialog
@@ -24,7 +26,6 @@ from gnomenews.about import AboutDialog
import os
import os.path
-CACHE_PATH = GLib.get_user_cache_dir()
class Application(Gtk.Application):
@@ -56,7 +57,7 @@ class Application(Gtk.Application):
@log
def create_cache(self):
if not os.path.isdir(CACHE_PATH):
- GLib.mkdir_with_parents(CACHE_PATH, 0755)
+ GLib.mkdir_with_parents(CACHE_PATH, int("0755", 8))
@log
def do_startup(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]