commit 2867c14b4d6fd85b2e864eafa2aa9816ed9c082b Author: Damian Johnson atagar@torproject.org Date: Mon Sep 2 11:40:37 2013 -0700
Removing version.py
Now that we can import our __init__.py that's the proper place for our versioning information to live. --- arm/__init__.py | 3 +++ arm/logPanel.py | 4 ++-- arm/popups.py | 4 ++-- arm/starter.py | 4 ++-- arm/version.py | 7 ------- 5 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/arm/__init__.py b/arm/__init__.py index 0fe42a0..ec6e69a 100644 --- a/arm/__init__.py +++ b/arm/__init__.py @@ -4,3 +4,6 @@ Scripts involved in validating user input, system state, and initializing arm.
__all__ = ["starter", "prereq", "version", "configPanel", "controller", "headerPanel", "logPanel", "popups", "torrcPanel"]
+__version__ = '1.4.6_dev' +__release_date__ = 'April 28, 2011' + diff --git a/arm/logPanel.py b/arm/logPanel.py index ad067b9..98843c4 100644 --- a/arm/logPanel.py +++ b/arm/logPanel.py @@ -17,7 +17,7 @@ from stem.response import events from stem.util import conf, log, system
import arm.popups -from arm.version import VERSION +from arm import __version__ from arm.util import panel, sysTools, torTools, uiTools
TOR_EVENT_TYPES = { @@ -554,7 +554,7 @@ class LogPanel(panel.Panel, threading.Thread, logging.Handler): if not os.path.exists(baseDir): os.makedirs(baseDir)
self.logFile = open(logPath, "a") - log.notice("arm %s opening log file (%s)" % (VERSION, logPath)) + log.notice("arm %s opening log file (%s)" % (__version__, logPath)) except (IOError, OSError), exc: log.error("Unable to write to log file: %s" % sysTools.getFileErrorMsg(exc)) self.logFile = None diff --git a/arm/popups.py b/arm/popups.py index ce31218..2b40558 100644 --- a/arm/popups.py +++ b/arm/popups.py @@ -4,9 +4,9 @@ Functions for displaying popups in the interface.
import curses
-import version import arm.controller
+from arm import __version__, __release_date__ from arm.util import panel, uiTools
def init(height = -1, width = -1, top = 0, left = 0, belowStatic = True): @@ -169,7 +169,7 @@ def showAboutPopup():
popup.win.box() popup.addstr(0, 0, "About:", curses.A_STANDOUT) - popup.addstr(1, 2, "arm, version %s (released %s)" % (version.VERSION, version.LAST_MODIFIED), curses.A_BOLD) + popup.addstr(1, 2, "arm, version %s (released %s)" % (__version__, __release_date__), curses.A_BOLD) popup.addstr(2, 4, "Written by Damian Johnson (atagar@torproject.org)") popup.addstr(3, 4, "Project page: www.atagar.com/arm") popup.addstr(5, 2, "Released under the GPL v3 (http://www.gnu.org/licenses/gpl.html)") diff --git a/arm/starter.py b/arm/starter.py index b99ac83..0131e97 100644 --- a/arm/starter.py +++ b/arm/starter.py @@ -15,7 +15,6 @@ import locale import logging import platform
-import arm.version import arm.controller import arm.logPanel import arm.util.connections @@ -24,6 +23,7 @@ import arm.util.torConfig import arm.util.torTools import arm.util.uiTools
+from arm import __version__, __release_date__ from stem.control import Controller
import stem.connection @@ -295,7 +295,7 @@ def main(): elif opt in ("-e", "--event"): param["startup.events"] = arg # set event flags elif opt in ("-v", "--version"): - print "arm version %s (released %s)\n" % (version.VERSION, version.LAST_MODIFIED) + print "arm version %s (released %s)\n" % (__version__, __release_date__) sys.exit() elif opt in ("-h", "--help"): print HELP_MSG diff --git a/arm/version.py b/arm/version.py deleted file mode 100644 index bbbd5bb..0000000 --- a/arm/version.py +++ /dev/null @@ -1,7 +0,0 @@ -""" -Provides arm's version and release date. -""" - -VERSION = '1.4.6_dev' -LAST_MODIFIED = "April 28, 2011" -
tor-commits@lists.torproject.org