summaryrefslogtreecommitdiff
path: root/UpdateManager/MetaRelease.py
diff options
context:
space:
mode:
authorglatzor@ubuntu.com <>2006-08-02 18:37:59 +0200
committerglatzor@ubuntu.com <>2006-08-02 18:37:59 +0200
commit0a5aacc19bfe31eda221e2f6476712097d693a06 (patch)
tree8995ea136686477cc31a4e240b6464ea0c6d6ed0 /UpdateManager/MetaRelease.py
parent70bf03a91044f338aed8acd819c15dc8d5968103 (diff)
parentdde2af913b3f26958f93f604d7a75e61e64ec7f1 (diff)
downloadpython-apt-0a5aacc19bfe31eda221e2f6476712097d693a06.tar.gz
* merge with main
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)