summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/nagstamon/files/nagstamon-0.9.9-resources.patch')
-rw-r--r--net-analyzer/nagstamon/files/nagstamon-0.9.9-resources.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/net-analyzer/nagstamon/files/nagstamon-0.9.9-resources.patch b/net-analyzer/nagstamon/files/nagstamon-0.9.9-resources.patch
new file mode 100644
index 000000000000..c5f709f05690
--- /dev/null
+++ b/net-analyzer/nagstamon/files/nagstamon-0.9.9-resources.patch
@@ -0,0 +1,33 @@
+diff --git a/nagstamon.py b/nagstamon.py
+index 5d61ef8..0a4db87 100755
+--- a/nagstamon.py
++++ b/nagstamon.py
+@@ -35,17 +35,17 @@ conf.Convert_Conf_to_Multiple_Servers()
+ conf.Convert_Conf_to_Custom_Actions()
+
+ # try to get resources path if nagstamon got be installed by setup.py
+-Resources = ""
+-try:
+- import pkg_resources
+- Resources = pkg_resources.resource_filename("Nagstamon", "resources")
+-except Exception, err:
+- # get resources directory from current directory - only if not being set before by pkg_resources
+- if Resources == "":
+- if os.path.exists(os.path.normcase(os.getcwd() + os.sep + "Nagstamon" + os.sep + "resources")):
+- Resources = os.path.normcase(os.getcwd() + os.sep + "Nagstamon" + os.sep + "resources")
+- else:
+- Resources = os.path.normcase(os.getcwd() + os.sep + "resources")
++Resources = "/usr/share/nagstamon/resources"
++#try:
++# import pkg_resources
++# Resources = pkg_resources.resource_filename("Nagstamon", "resources")
++#except Exception, err:
++# # get resources directory from current directory - only if not being set before by pkg_resources
++# if Resources == "":
++# if os.path.exists(os.path.normcase(os.getcwd() + os.sep + "Nagstamon" + os.sep + "resources")):
++# Resources = os.path.normcase(os.getcwd() + os.sep + "Nagstamon" + os.sep + "resources")
++# else:
++# Resources = os.path.normcase(os.getcwd() + os.sep + "resources")
+
+ # initialize GUI and actions
+ # if modules are not available from central python install try the ones in the same directory