summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-05-11 17:37:43 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-05-11 17:37:43 +0200
commit49ac4006ec43c8a3989192110aeec8c139d80196 (patch)
tree961c0d2c35e1a9daf269306e073e955dcb1c2fff
parentbd43d9d7add3430e939cdb28d9a71189ad3cc72d (diff)
downloadpython-apt-49ac4006ec43c8a3989192110aeec8c139d80196.tar.gz
* SoftwareProperties/SoftwareProperties.py:
- create a empty file if no config exists
-rw-r--r--SoftwareProperties/SoftwareProperties.py14
-rw-r--r--debian/changelog4
2 files changed, 15 insertions, 3 deletions
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py
index 8c3e4878..9d041468 100644
--- a/SoftwareProperties/SoftwareProperties.py
+++ b/SoftwareProperties/SoftwareProperties.py
@@ -319,9 +319,19 @@ class SoftwareProperties(SimpleGladeApp):
def write_config(self):
# update the adept file as well if it is there
- for periodic in ["/etc/apt/apt.conf.d/10periodic",
- "/etc/apt/apt.conf.d/15adept-periodic-update"]:
+ conffiles = ["/etc/apt/apt.conf.d/10periodic",
+ "/etc/apt/apt.conf.d/15adept-periodic-update"]
+ # check (beforehand) if one exists, if not create one
+ for f in conffiles:
+ if os.path.isfile(f):
+ break
+ else:
+ print "No config found, creating one"
+ open(conffiles[0], "w")
+
+ # now update them
+ for periodic in conffiles:
# read the old content first
content = []
if os.path.isfile(periodic):
diff --git a/debian/changelog b/debian/changelog
index c402c726..413226f8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,10 @@ update-manager (0.42.2ubuntu16) dapper; urgency=low
* use version and section of the source package (if this information is
available) when building the changelog URL (ubuntu #40058)
+ * SoftwareProperties/SoftwareProperties.py:
+ - if no config is found create a new one (ubuntu: #37560)
- --
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 11 May 2006 17:33:40 +0200
update-manager (0.42.2ubuntu15) dapper; urgency=low