prelude-correlator/master: Use module __version__ for version Bookkeeping

[email protected] Thu, 18 Jun 2009 15:33:16 +0200 (CEST)
Newsgroups gmane.comp.security.ids.prelude.cvs
Message-ID <[email protected]>
commit 0ebfb4976ae927cfc1766fd28c3e0e0f023d7be2
Author: Yoann Vandoorselaere <[email protected]>
Date:   Thu Jun 18 12:56:42 2009 +0200

    Use module __version__ for version Bookkeeping


========================================

 PreludeCorrelator/__init__.py |   20 ++++++++++++++++++++
 PreludeCorrelator/main.py     |    5 +----
 2 files changed, 21 insertions(+), 4 deletions(-)

========================================

diff --git a/PreludeCorrelator/__init__.py b/PreludeCorrelator/__init__.py
index e69de29..6f9d1ee 100644
--- a/PreludeCorrelator/__init__.py
+++ b/PreludeCorrelator/__init__.py
@@ -0,0 +1,20 @@
+# Copyright (C) 2009 PreludeIDS Technologies. All Rights Reserved.
+# Author: Yoann Vandoorselaere <[email protected]>
+#
+# This file is part of the Prelude-Correlator program.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING.  If not, write to
+# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+__version__ = __import__('pkg_resources').get_distribution('prelude-correlator').version
diff --git a/PreludeCorrelator/main.py b/PreludeCorrelator/main.py
index c443c71..06112b9 100644
--- a/PreludeCorrelator/main.py
+++ b/PreludeCorrelator/main.py
@@ -23,12 +23,9 @@ import pkg_resources
 import sys, os, time, signal
 from optparse import OptionParser
 from PreludeEasy import ClientEasy, CheckVersion
+from PreludeCorrelator import __version__ as VERSION
 from PreludeCorrelator import idmef, pluginmanager, context, siteconfig, log
 
-
-VERSION = pkg_resources.get_distribution('prelude-correlator').version
-
-
 class Env:
         def __init__(self):
                 self.logger = log.Log()
_______________________________________________
Prelude-cvslog site list
[email protected]
http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog