Merge lp:~xnox/apt-btrfs-snapshot/pep8 into lp:apt-btrfs-snapshot

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 48
Proposed branch: lp:~xnox/apt-btrfs-snapshot/pep8
Merge into: lp:apt-btrfs-snapshot
Diff against target: 76 lines (+17/-9)
3 files modified
apt_btrfs_snapshot.py (+10/-8)
debian/changelog (+6/-0)
test/test_apt_btrfs_snapshot.py (+1/-1)
To merge this branch: bzr merge lp:~xnox/apt-btrfs-snapshot/pep8
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+142023@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Looks good, thanks. I personally prefer lines 8, 43 to be in the same line but thats a tiny detail.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'apt_btrfs_snapshot.py'
2--- apt_btrfs_snapshot.py 2012-07-12 11:30:15 +0000
3+++ apt_btrfs_snapshot.py 2013-01-06 02:46:20 +0000
4@@ -128,9 +128,10 @@
5 def _get_supported_btrfs_root_fstab_entry(self):
6 """ return the supported btrfs root FstabEntry or None """
7 for entry in self.fstab:
8- if (entry.mountpoint == "/" and
9- entry.fstype == "btrfs" and
10- "subvol=@" in entry.options):
11+ if (
12+ entry.mountpoint == "/" and
13+ entry.fstype == "btrfs" and
14+ "subvol=@" in entry.options):
15 return entry
16 return None
17
18@@ -213,7 +214,7 @@
19 try:
20 print("Available snapshots older than '%s':" % timefmt)
21 print(" \n".join(self.get_btrfs_root_snapshots_list(
22- older_than=older_than_unixtime)))
23+ older_than=older_than_unixtime)))
24 except AptBtrfsRootWithNoatimeError:
25 sys.stderr.write("Error: fstab option 'noatime' incompatible "
26 "with option")
27@@ -225,7 +226,7 @@
28 older_than_unixtime = self._parse_older_than_to_unixtime(timefmt)
29 try:
30 for snap in self.get_btrfs_root_snapshots_list(
31- older_than=older_than_unixtime):
32+ older_than=older_than_unixtime):
33 res &= self.delete_snapshot(snap)
34 except AptBtrfsRootWithNoatimeError:
35 sys.stderr.write("Error: fstab option 'noatime' incompatible with "
36@@ -241,9 +242,10 @@
37 """ set new default """
38 mp = self.mount_btrfs_root_volume()
39 new_root = os.path.join(mp, snapshot_name)
40- if (os.path.isdir(new_root) and
41- snapshot_name.startswith("@") and
42- snapshot_name != "@"):
43+ if (
44+ os.path.isdir(new_root) and
45+ snapshot_name.startswith("@") and
46+ snapshot_name != "@"):
47 default_root = os.path.join(mp, "@")
48 backup = os.path.join(mp, self.BACKUP_PREFIX + self._get_now_str())
49 os.rename(default_root, backup)
50
51=== modified file 'debian/changelog'
52--- debian/changelog 2012-10-26 09:27:26 +0000
53+++ debian/changelog 2013-01-06 02:46:20 +0000
54@@ -1,3 +1,9 @@
55+apt-btrfs-snapshot (0.3.4.1) raring; urgency=low
56+
57+ * Fix FTBFS due to newer, more strict, pep8.
58+
59+ -- Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> Sun, 06 Jan 2013 02:41:49 +0000
60+
61 apt-btrfs-snapshot (0.3.4) raring; urgency=low
62
63 * Build depend on python3-all.
64
65=== modified file 'test/test_apt_btrfs_snapshot.py'
66--- test/test_apt_btrfs_snapshot.py 2012-07-12 07:31:09 +0000
67+++ test/test_apt_btrfs_snapshot.py 2013-01-06 02:46:20 +0000
68@@ -16,7 +16,7 @@
69 from apt_btrfs_snapshot import (
70 AptBtrfsSnapshot,
71 AptBtrfsRootWithNoatimeError,
72- )
73+)
74
75
76 class TestFstab(unittest.TestCase):

Subscribers

People subscribed via source and target branches