From 19639e82319463cfb5c311155d63e06dd8ad5bde Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 2 Aug 2006 10:07:30 +0200 Subject: * data/update-manager.schemas.in: - set check_dist_upgrades to True again * UpdateManager/DistUpgradeFetcher.py, UpdateManager/MetaRelease.py: - handle the situation when run as non-root * UpdateManager/UpdateManager.py: - cleanup (removed dead code) --- UpdateManager/MetaRelease.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'UpdateManager/MetaRelease.py') diff --git a/UpdateManager/MetaRelease.py b/UpdateManager/MetaRelease.py index 57a808ee..70993eaf 100644 --- a/UpdateManager/MetaRelease.py +++ b/UpdateManager/MetaRelease.py @@ -60,8 +60,15 @@ class MetaRelease(gobject.GObject): def __init__(self, useDevelopmentRelase=False): gobject.GObject.__init__(self) + # check what uri to use if useDevelopmentRelase: self.METARELEASE_URI = self.METARELEASE_URI_UNSTABLE + # check if we can access the METARELEASE_FILE + if not os.access(self.METARELEASE_FILE, os.F_OK|os.W_OK|os.R_OK): + path = os.path.expanduser("~/.update-manager/") + if not os.path.exists(path): + os.mkdir(path) + self.METARELEASE_FILE = os.path.join(path,"meta-release") self.metarelease_information = None self.downloading = True # we start the download thread here and we have a timeout @@ -168,6 +175,3 @@ class MetaRelease(gobject.GObject): if os.path.exists(self.METARELEASE_FILE): f=open(self.METARELEASE_FILE,"r") -# register in the gobject system, needed for older versions of pygtk, -# never ones do this automatically -gobject.type_register(MetaRelease) -- cgit v1.2.3