1 |
commit: 9106a39047c9173d7b768aeefd9a3eda556f704b |
2 |
Author: Tom Wijsman <tomwij <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 3 11:42:39 2014 +0000 |
4 |
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> |
5 |
CommitDate: Wed Oct 1 23:45:33 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9106a390 |
7 |
|
8 |
repoman: Fix up pyflakes imports and undefined functions or values |
9 |
|
10 |
--- |
11 |
pym/repoman/_xml.py | 5 +---- |
12 |
pym/repoman/checks/herds/herdbase.py | 2 ++ |
13 |
pym/repoman/copyrights.py | 10 ++++------ |
14 |
pym/repoman/modules/commit/repochecks.py | 2 -- |
15 |
pym/repoman/profile.py | 3 ++- |
16 |
5 files changed, 9 insertions(+), 13 deletions(-) |
17 |
|
18 |
diff --git a/pym/repoman/_xml.py b/pym/repoman/_xml.py |
19 |
index 1871875..b97c027 100644 |
20 |
--- a/pym/repoman/_xml.py |
21 |
+++ b/pym/repoman/_xml.py |
22 |
@@ -55,7 +55,6 @@ class XmlLint(object): |
23 |
self.binary = None |
24 |
self._check_capable(options, repolevel, repoman_settings) |
25 |
|
26 |
- |
27 |
def _check_capable(self, options, repolevel, repoman_settings): |
28 |
if options.mode == "manifest": |
29 |
return |
30 |
@@ -71,15 +70,13 @@ class XmlLint(object): |
31 |
# this can be problematic if xmllint changes their output |
32 |
self._is_capable = True |
33 |
|
34 |
- |
35 |
@property |
36 |
def capable(self): |
37 |
return self._is_capable |
38 |
|
39 |
- |
40 |
def check(self, checkdir): |
41 |
if not self.capable: |
42 |
- return true |
43 |
+ return True |
44 |
# xmlint can produce garbage output even on success, so only dump |
45 |
# the ouput when it fails. |
46 |
st, out = repoman_getstatusoutput( |
47 |
|
48 |
diff --git a/pym/repoman/checks/herds/herdbase.py b/pym/repoman/checks/herds/herdbase.py |
49 |
index b1ba671..cfa37e4 100644 |
50 |
--- a/pym/repoman/checks/herds/herdbase.py |
51 |
+++ b/pym/repoman/checks/herds/herdbase.py |
52 |
@@ -24,6 +24,8 @@ from portage import _encodings, _unicode_encode |
53 |
from portage.exception import FileNotFound, ParseError, PermissionDenied |
54 |
from portage import os |
55 |
|
56 |
+from repoman.errors import err |
57 |
+ |
58 |
__all__ = [ |
59 |
"make_herd_base", "get_herd_base" |
60 |
] |
61 |
|
62 |
diff --git a/pym/repoman/copyrights.py b/pym/repoman/copyrights.py |
63 |
index 01ce42f..056cfda 100644 |
64 |
--- a/pym/repoman/copyrights.py |
65 |
+++ b/pym/repoman/copyrights.py |
66 |
@@ -87,11 +87,11 @@ def update_copyright(fn_path, year, pretend=False): |
67 |
new_header.append(line) |
68 |
|
69 |
difflines = 0 |
70 |
- for line in difflib.unified_diff( |
71 |
- [_unicode_decode(line) for line in orig_header], |
72 |
- [_unicode_decode(line) for line in new_header], |
73 |
+ for diffline in difflib.unified_diff( |
74 |
+ [_unicode_decode(diffline) for diffline in orig_header], |
75 |
+ [_unicode_decode(diffline) for diffline in new_header], |
76 |
fromfile=fn_path, tofile=fn_path, n=0): |
77 |
- util.writemsg_stdout(line, noiselevel=-1) |
78 |
+ util.writemsg_stdout(diffline, noiselevel=-1) |
79 |
difflines += 1 |
80 |
util.writemsg_stdout("\n", noiselevel=-1) |
81 |
|
82 |
@@ -117,5 +117,3 @@ def update_copyright(fn_path, year, pretend=False): |
83 |
else: |
84 |
util.apply_stat_permissions(fn_path, fn_stat) |
85 |
fn_hdl.close() |
86 |
- |
87 |
- |
88 |
|
89 |
diff --git a/pym/repoman/modules/commit/repochecks.py b/pym/repoman/modules/commit/repochecks.py |
90 |
index d0e2f28..2839864 100644 |
91 |
--- a/pym/repoman/modules/commit/repochecks.py |
92 |
+++ b/pym/repoman/modules/commit/repochecks.py |
93 |
@@ -1,9 +1,7 @@ |
94 |
|
95 |
- |
96 |
from portage.output import red |
97 |
|
98 |
from repoman.errors import err |
99 |
-from repoman.vcs import vcs |
100 |
from repoman.vcs.vcs import detect_vcs_conflicts |
101 |
|
102 |
|
103 |
|
104 |
diff --git a/pym/repoman/profile.py b/pym/repoman/profile.py |
105 |
index 03e6c24..11b93c7 100644 |
106 |
--- a/pym/repoman/profile.py |
107 |
+++ b/pym/repoman/profile.py |
108 |
@@ -1,6 +1,7 @@ |
109 |
|
110 |
-from portage import os |
111 |
from portage import normalize_path |
112 |
+from portage import os |
113 |
+from portage.output import red |
114 |
|
115 |
|
116 |
class ProfileDesc(object): |