Gentoo Archives: gentoo-commits

From: "Christian Ruppert (idl0r)" <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/nagstamon/files: nagstamon-0.9.10_p20130222.patch
Date: Wed, 27 Feb 2013 20:44:16
Message-Id: 20130227204411.163B820081@flycatcher.gentoo.org
1 idl0r 13/02/27 20:44:11
2
3 Added: nagstamon-0.9.10_p20130222.patch
4 Log:
5 Version bump
6
7 (Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key B427ABC8)
8
9 Revision Changes Path
10 1.1 net-analyzer/nagstamon/files/nagstamon-0.9.10_p20130222.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagstamon/files/nagstamon-0.9.10_p20130222.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagstamon/files/nagstamon-0.9.10_p20130222.patch?rev=1.1&content-type=text/plain
14
15 Index: nagstamon-0.9.10_p20130222.patch
16 ===================================================================
17 From a0c44eac2a152291e2ce04bb7c320da896c77af2 Mon Sep 17 00:00:00 2001
18 From: Christian Ruppert <idl0r@g.o>
19 Date: Tue, 26 Feb 2013 22:59:21 +0100
20 Subject: [PATCH] Fix BeautifulSoup import
21
22
23 Signed-off-by: Christian Ruppert <idl0r@g.o>
24 ---
25 Nagstamon/Nagstamon/Server/Ninja.py | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28 diff --git a/Nagstamon/Nagstamon/Server/Ninja.py b/Nagstamon/Nagstamon/Server/Ninja.py
29 index dd53cbe..4cee123 100644
30 --- a/Nagstamon/Nagstamon/Server/Ninja.py
31 +++ b/Nagstamon/Nagstamon/Server/Ninja.py
32 @@ -13,7 +13,7 @@ import cookielib
33 from Nagstamon import Actions
34 from Nagstamon.Objects import *
35 from Nagstamon.Server.Generic import GenericServer, not_empty
36 -from Nagstamon.BeautifulSoup import BeautifulSoup
37 +from BeautifulSoup import BeautifulSoup
38
39 class NinjaServer(GenericServer):
40 """
41 --
42 1.7.12.4
43
44 diff --git a/Nagstamon/nagstamon.py b/Nagstamon/nagstamon.py
45 index 2206db5..66da87e 100755
46 --- a/Nagstamon/nagstamon.py
47 +++ b/Nagstamon/nagstamon.py
48 @@ -33,40 +33,7 @@ conf.Convert_Conf_to_Multiple_Servers()
49 conf.Convert_Conf_to_Custom_Actions()
50
51 # try to get resources path if nagstamon got be installed by setup.py
52 -Resources = ""
53 -try:
54 - import pkg_resources
55 - Resources = pkg_resources.resource_filename("Nagstamon", "resources")
56 -except Exception, err:
57 - # get resources directory from current directory - only if not being set before by pkg_resources
58 - # try-excepts necessary for platforms like Windows .EXE
59 - join = os.path.join
60 - normcase = os.path.normcase
61 - paths_to_check = [normcase(join(os.getcwd(), "Nagstamon", "resources")),
62 - normcase(join(os.getcwd(), "resources"))]
63 - try:
64 - # if resources dir is not available in CWD, try the
65 - # libs dir (site-packages) for the current Python
66 - from distutils.sysconfig import get_python_lib
67 - paths_to_check.append(normcase(join(get_python_lib(), "Nagstamon", "resources")))
68 - except:
69 - pass
70 -
71 - #if we're still out of luck, maybe this was a user scheme install
72 - try:
73 - import site
74 - site.getusersitepackages() #make sure USER_SITE is set
75 - paths_to_check.append(normcase(join(site.USER_SITE, "Nagstamon", "resources")))
76 - except:
77 - pass
78 -
79 - # add directory nagstamon.py where nagstamon.py resides for cases like 0install without installed pkg-resources
80 - paths_to_check.append(os.sep.join(sys.argv[0].split(os.sep)[:-1] + ["Nagstamon", "resources"]))
81 -
82 - for path in paths_to_check:
83 - if os.path.exists(path):
84 - Resources = path
85 - break
86 +Resources = "/usr/share/nagstamon/resources"
87
88 # initialize GUI and actions
89 # if modules are not available from central python install try the ones in the same directory