1 |
commit: b48733ee81b9d68ef1629f772071924142979e31 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 6 15:02:47 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 6 15:02:47 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b48733ee |
7 |
|
8 |
lint: clean up superfluous parens |
9 |
|
10 |
These don't need the parens, so omit them. |
11 |
|
12 |
In the case of setup.py, we were expecting a print function, not a |
13 |
keyword, so make sure to import that module. |
14 |
|
15 |
catalyst/lock.py | 6 +++--- |
16 |
doc/make_subarch_table_guidexml.py | 6 +++--- |
17 |
setup.py | 1 + |
18 |
3 files changed, 7 insertions(+), 6 deletions(-) |
19 |
|
20 |
diff --git a/catalyst/lock.py b/catalyst/lock.py |
21 |
index d079b2d..3d50c06 100644 |
22 |
--- a/catalyst/lock.py |
23 |
+++ b/catalyst/lock.py |
24 |
@@ -179,7 +179,7 @@ class LockDir(object): |
25 |
if not os.path.exists(self.lockfile): |
26 |
print "lockfile does not exist '%s'" % self.lockfile |
27 |
#print "fcntl_unlock() , self.myfd:", self.myfd, type(self.myfd) |
28 |
- if (self.myfd != None): |
29 |
+ if self.myfd != None: |
30 |
#print "fcntl_unlock() trying to close it " |
31 |
try: |
32 |
os.close(self.myfd) |
33 |
@@ -236,7 +236,7 @@ class LockDir(object): |
34 |
#if type(lockfilename) == types.StringType: |
35 |
# os.close(myfd) |
36 |
#print "fcntl_unlock() trying a last ditch close", self.myfd |
37 |
- if (self.myfd != None): |
38 |
+ if self.myfd != None: |
39 |
os.close(self.myfd) |
40 |
self.myfd=None |
41 |
self.locked=False |
42 |
@@ -256,7 +256,7 @@ class LockDir(object): |
43 |
start_time = time.time() |
44 |
reported_waiting = False |
45 |
|
46 |
- while(time.time() < (start_time + max_wait)): |
47 |
+ while time.time() < (start_time + max_wait): |
48 |
# We only need it to exist. |
49 |
self.myfd = os.open(self.myhardlock, os.O_CREAT|os.O_RDWR,0660) |
50 |
os.close(self.myfd) |
51 |
|
52 |
diff --git a/doc/make_subarch_table_guidexml.py b/doc/make_subarch_table_guidexml.py |
53 |
index 54e0a4a..a6a9022 100755 |
54 |
--- a/doc/make_subarch_table_guidexml.py |
55 |
+++ b/doc/make_subarch_table_guidexml.py |
56 |
@@ -30,7 +30,7 @@ def handle_line(line, subarch_title_to_subarch_id, subarch_id_to_pattern_arch_ge |
57 |
# Apply alias grouping |
58 |
arch = _pattern_arch_genericliases.get(arch, arch) |
59 |
|
60 |
- assert(subarch not in subarch_id_to_pattern_arch_genericrch_id) |
61 |
+ assert subarch not in subarch_id_to_pattern_arch_genericrch_id |
62 |
subarch_id_to_pattern_arch_genericrch_id[subarch] = arch |
63 |
|
64 |
return |
65 |
@@ -40,7 +40,7 @@ def handle_line(line, subarch_title_to_subarch_id, subarch_id_to_pattern_arch_ge |
66 |
child_subarch = x.group(1) |
67 |
parent_subarch = x.group(2) |
68 |
|
69 |
- assert(child_subarch not in subarch_id_to_pattern_arch_genericrch_id) |
70 |
+ assert child_subarch not in subarch_id_to_pattern_arch_genericrch_id |
71 |
subarch_id_to_pattern_arch_genericrch_id[child_subarch] = subarch_id_to_pattern_arch_genericrch_id[parent_subarch] |
72 |
|
73 |
return |
74 |
@@ -49,7 +49,7 @@ def handle_line(line, subarch_title_to_subarch_id, subarch_id_to_pattern_arch_ge |
75 |
subarch_title = x.group(1) |
76 |
subarch_id = x.group(2) |
77 |
|
78 |
- assert(subarch_title not in subarch_title_to_subarch_id) |
79 |
+ assert subarch_title not in subarch_title_to_subarch_id |
80 |
subarch_title_to_subarch_id[subarch_title] = subarch_id |
81 |
|
82 |
|
83 |
|
84 |
diff --git a/setup.py b/setup.py |
85 |
index e4569ee..a875db1 100755 |
86 |
--- a/setup.py |
87 |
+++ b/setup.py |
88 |
@@ -1,5 +1,6 @@ |
89 |
"""Catalyst is a release building tool used by Gentoo Linux""" |
90 |
|
91 |
+from __future__ import print_function |
92 |
|
93 |
import codecs as _codecs |
94 |
from distutils.core import setup as _setup, Command as _Command |