summaryrefslogtreecommitdiff
path: root/UpdateManager/MetaRelease.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-08-02 10:07:30 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-08-02 10:07:30 +0200
commit19639e82319463cfb5c311155d63e06dd8ad5bde (patch)
tree9f91c83245bc506fff0eede68f6e8921cacbb3dc /UpdateManager/MetaRelease.py
parentcc6eb736ca4613d70c3f7ff30317af340ca70bb7 (diff)
downloadpython-apt-19639e82319463cfb5c311155d63e06dd8ad5bde.tar.gz
* 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)
Diffstat (limited to 'UpdateManager/MetaRelease.py')
-rw-r--r--UpdateManager/MetaRelease.py10
1 files changed, 7 insertions, 3 deletions
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)