Merge lp:~mvo/software-center/python-apt-0.8 into lp:software-center

Proposed by Michael Vogt
Status: Merged
Merged at revision: 3041
Proposed branch: lp:~mvo/software-center/python-apt-0.8
Merge into: lp:software-center
Diff against target: 41 lines (+5/-5)
2 files modified
softwarecenter/utils.py (+1/-1)
tests/test_apthistory.py (+4/-4)
To merge this branch: bzr merge lp:~mvo/software-center/python-apt-0.8
Reviewer Review Type Date Requested Status
Natalia Bidart Approve
Review via email: mp+109875@code.launchpad.net

Description of the change

Trivial fixes for a leftover python-apt 0.7 -> 0.8 API transition.

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Looks great! and the test suite is all green on Precise.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'softwarecenter/utils.py'
--- softwarecenter/utils.py 2012-05-24 08:55:44 +0000
+++ softwarecenter/utils.py 2012-06-12 15:41:24 +0000
@@ -331,7 +331,7 @@
331 takes a PPA SourceEntry and returns a filename suitable for sources.list.d331 takes a PPA SourceEntry and returns a filename suitable for sources.list.d
332 """332 """
333 import apt_pkg333 import apt_pkg
334 name = "%s.list" % apt_pkg.URItoFileName(entry.uri)334 name = "%s.list" % apt_pkg.uri_to_filename(entry.uri)
335 return name335 return name
336336
337337
338338
=== modified file 'tests/test_apthistory.py'
--- tests/test_apthistory.py 2012-05-30 21:52:08 +0000
+++ tests/test_apthistory.py 2012-06-12 15:41:24 +0000
@@ -21,8 +21,8 @@
2121
22 def setUp(self):22 def setUp(self):
23 self.basedir = os.path.join(DATA_DIR, "apt-history")23 self.basedir = os.path.join(DATA_DIR, "apt-history")
24 apt.apt_pkg.Config.set("Dir::Log", self.basedir)24 apt.apt_pkg.config.set("Dir::Log", self.basedir)
25 #apt_pkg.Config.set("Dir::Log::History", "./")25 #apt_pkg.config.set("Dir::Log::History", "./")
2626
27 def _get_apt_history(self):27 def _get_apt_history(self):
28 history = AptHistory(use_cache=False)28 history = AptHistory(use_cache=False)
@@ -84,11 +84,11 @@
8484
85 def test_no_history_log(self):85 def test_no_history_log(self):
86 # set to dir with no existing history.log86 # set to dir with no existing history.log
87 apt.apt_pkg.Config.set("Dir::Log", "/")87 apt.apt_pkg.config.set("Dir::Log", "/")
88 # this should not raise88 # this should not raise
89 history = self._get_apt_history()89 history = self._get_apt_history()
90 self.assertEqual(history.transactions, [])90 self.assertEqual(history.transactions, [])
91 apt.apt_pkg.Config.set("Dir::Log", self.basedir)91 apt.apt_pkg.config.set("Dir::Log", self.basedir)
9292
93if __name__ == "__main__":93if __name__ == "__main__":
94 unittest.main()94 unittest.main()

Subscribers

People subscribed via source and target branches