1 |
commit: 1fbfbcf3397dc78f59bcdc5a7e93872fb8b30583 |
2 |
Author: André Erdmann <dywi <AT> mailerd <DOT> de> |
3 |
AuthorDate: Thu Aug 29 15:16:19 2013 +0000 |
4 |
Commit: André Erdmann <dywi <AT> mailerd <DOT> de> |
5 |
CommitDate: Thu Aug 29 15:16:19 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=1fbfbcf3 |
7 |
|
8 |
minor fixup |
9 |
|
10 |
unused imports / typos |
11 |
|
12 |
--- |
13 |
roverlay/defaultscript.py | 4 ++-- |
14 |
roverlay/packagerules/acceptors/util.py | 2 -- |
15 |
roverlay/runtime.py | 1 - |
16 |
roverlay/stats/rating.py | 2 +- |
17 |
roverlay/status.py | 3 +-- |
18 |
roverlay/util/dictwalk.py | 2 +- |
19 |
roverlay/util/objects.py | 4 ++-- |
20 |
7 files changed, 7 insertions(+), 11 deletions(-) |
21 |
|
22 |
diff --git a/roverlay/defaultscript.py b/roverlay/defaultscript.py |
23 |
index 7ab2ad0..6e2443c 100644 |
24 |
--- a/roverlay/defaultscript.py |
25 |
+++ b/roverlay/defaultscript.py |
26 |
@@ -230,7 +230,7 @@ def run_sync ( env ): |
27 |
|
28 |
## extra_opts->distdir |
29 |
if 'distdirs' in env.options: |
30 |
- repo_list.add_distdirs ( OPTION ( 'distdirs' ) ) |
31 |
+ repo_list.add_distdirs ( env.option ( 'distdirs' ) ) |
32 |
else: |
33 |
# default repo list |
34 |
repo_list.load() |
35 |
@@ -244,7 +244,7 @@ def run_sync ( env ): |
36 |
except: |
37 |
if env.hide_exceptions: |
38 |
die ( |
39 |
- ( "no" if OPTION ( "nosync" ) else "" ) + "sync() failed!", |
40 |
+ ( "no" if env.option ( "nosync" ) else "" ) + "sync() failed!", |
41 |
DIE.SYNC |
42 |
) |
43 |
else: |
44 |
|
45 |
diff --git a/roverlay/packagerules/acceptors/util.py b/roverlay/packagerules/acceptors/util.py |
46 |
index ad7ed60..7ba83f0 100644 |
47 |
--- a/roverlay/packagerules/acceptors/util.py |
48 |
+++ b/roverlay/packagerules/acceptors/util.py |
49 |
@@ -4,8 +4,6 @@ |
50 |
# Distributed under the terms of the GNU General Public License; |
51 |
# either version 2 of the License, or (at your option) any later version. |
52 |
|
53 |
-import roverlay.packageinfo |
54 |
- |
55 |
# Functions that return package info values |
56 |
# * accessing p_info._info directly here |
57 |
|
58 |
|
59 |
diff --git a/roverlay/runtime.py b/roverlay/runtime.py |
60 |
index a65555d..966436f 100644 |
61 |
--- a/roverlay/runtime.py |
62 |
+++ b/roverlay/runtime.py |
63 |
@@ -6,7 +6,6 @@ |
64 |
|
65 |
import logging |
66 |
import errno |
67 |
-import os |
68 |
import sys |
69 |
|
70 |
|
71 |
|
72 |
diff --git a/roverlay/stats/rating.py b/roverlay/stats/rating.py |
73 |
index 6486d61..b0863c3 100644 |
74 |
--- a/roverlay/stats/rating.py |
75 |
+++ b/roverlay/stats/rating.py |
76 |
@@ -63,7 +63,7 @@ class StatsRating ( object ): |
77 |
|
78 |
@roverlay.util.objects.abstractmethod |
79 |
def get_rating ( self, value ): |
80 |
- return STATUS_NONE |
81 |
+ return self.STATUS_NONE |
82 |
# --- end of get_rating (...) --- |
83 |
|
84 |
# --- end of StatsRating --- |
85 |
|
86 |
diff --git a/roverlay/status.py b/roverlay/status.py |
87 |
index 7843380..df26c13 100644 |
88 |
--- a/roverlay/status.py |
89 |
+++ b/roverlay/status.py |
90 |
@@ -14,7 +14,6 @@ import os |
91 |
import sys |
92 |
import cgi |
93 |
import cgitb |
94 |
-import weakref |
95 |
|
96 |
|
97 |
# using mako |
98 |
@@ -517,7 +516,7 @@ def main ( installed, *args, **kw ): |
99 |
if main_env.outfile: |
100 |
with open ( |
101 |
main_env.outfile, |
102 |
- 'w' + ( 'b' if not isinstance ( output, str ) else 't' ) |
103 |
+ 'w' + ( 'b' if not isinstance ( output_encoded, str ) else 't' ) |
104 |
) as FH: |
105 |
# COULDFIX: write cgi header to file? |
106 |
#main_env.write_cgi_header ( FH, encode=True ) |
107 |
|
108 |
diff --git a/roverlay/util/dictwalk.py b/roverlay/util/dictwalk.py |
109 |
index a98b695..52a8c61 100644 |
110 |
--- a/roverlay/util/dictwalk.py |
111 |
+++ b/roverlay/util/dictwalk.py |
112 |
@@ -94,7 +94,7 @@ class DictWalker ( roverlay.util.namespace.Namespaceable ): |
113 |
# --- end of store_value (...) --- |
114 |
|
115 |
@roverlay.util.objects.abstractmethod |
116 |
- def get_value_container ( *args, **kwargs ): |
117 |
+ def get_value_container ( self, *args, **kwargs ): |
118 |
pass |
119 |
# --- end of get_value_container (...) --- |
120 |
|
121 |
|
122 |
diff --git a/roverlay/util/objects.py b/roverlay/util/objects.py |
123 |
index 323bc88..2bcb7e4 100644 |
124 |
--- a/roverlay/util/objects.py |
125 |
+++ b/roverlay/util/objects.py |
126 |
@@ -19,7 +19,7 @@ class SafeWeakRef ( weakref.ref ): |
127 |
|
128 |
Returns: the object / None |
129 |
""" |
130 |
- return super ( SafeWeakRef, self ).__call__() |
131 |
+ return weakref.ref.__call__ ( self ) |
132 |
# --- end of deref_unsafe (...) --- |
133 |
|
134 |
def deref_safe ( self ): |
135 |
@@ -29,7 +29,7 @@ class SafeWeakRef ( weakref.ref ): |
136 |
|
137 |
Raises: ObjectDisappeared if the object does no longer exist. |
138 |
""" |
139 |
- obj = super ( SafeWeakRef, self ).__call__() |
140 |
+ obj = self.deref_unsafe() |
141 |
if obj is not None: |
142 |
return obj |
143 |
else: |