1 |
jlec 14/06/04 13:08:29 |
2 |
|
3 |
Added: ngxtop-0.0.2-py3.patch |
4 |
Log: |
5 |
app-admin/ngxtop: Fix compatibility with >= py3.3, #512380 |
6 |
|
7 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-admin/ngxtop/files/ngxtop-0.0.2-py3.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/ngxtop/files/ngxtop-0.0.2-py3.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/ngxtop/files/ngxtop-0.0.2-py3.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: ngxtop-0.0.2-py3.patch |
16 |
=================================================================== |
17 |
ngxtop/config_parser.py | 4 ++-- |
18 |
ngxtop/ngxtop.py | 4 ++-- |
19 |
2 files changed, 4 insertions(+), 4 deletions(-) |
20 |
|
21 |
diff --git a/ngxtop/config_parser.py b/ngxtop/config_parser.py |
22 |
index b8e4804..40b23c9 100644 |
23 |
--- a/ngxtop/config_parser.py |
24 |
+++ b/ngxtop/config_parser.py |
25 |
@@ -8,7 +8,7 @@ import subprocess |
26 |
from pyparsing import Literal, Word, ZeroOrMore, OneOrMore, Group, \ |
27 |
printables, quotedString, pythonStyleComment, removeQuotes |
28 |
|
29 |
-from utils import choose_one, error_exit |
30 |
+from .utils import choose_one, error_exit |
31 |
|
32 |
|
33 |
REGEX_SPECIAL_CHARS = r'([\.\*\+\?\|\(\)\{\}\[\]])' |
34 |
@@ -106,7 +106,7 @@ def detect_log_config(arguments): |
35 |
|
36 |
log_formats = dict(get_log_formats(config_str)) |
37 |
if len(access_logs) == 1: |
38 |
- log_path, format_name = access_logs.items()[0] |
39 |
+ log_path, format_name = list(access_logs.items())[0] |
40 |
if format_name == 'combined': |
41 |
return log_path, LOG_FORMAT_COMBINED |
42 |
if format_name not in log_formats: |
43 |
diff --git a/ngxtop/ngxtop.py b/ngxtop/ngxtop.py |
44 |
index afb5bc3..8667b8b 100755 |
45 |
--- a/ngxtop/ngxtop.py |
46 |
+++ b/ngxtop/ngxtop.py |
47 |
@@ -74,8 +74,8 @@ except ImportError: |
48 |
from docopt import docopt |
49 |
import tabulate |
50 |
|
51 |
-from config_parser import detect_log_config, detect_config_path, extract_variables, build_pattern |
52 |
-from utils import error_exit |
53 |
+from .config_parser import detect_log_config, detect_config_path, extract_variables, build_pattern |
54 |
+from .utils import error_exit |
55 |
|
56 |
|
57 |
DEFAULT_QUERIES = [ |