]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
setup: fix a couple instances of hard-coded 'allmydata-tahoe' in the scripts, tighten...
authorZooko O'Whielacronx <zooko@zooko.com>
Sun, 1 Aug 2010 16:42:07 +0000 (09:42 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Sun, 1 Aug 2010 16:42:07 +0000 (09:42 -0700)
src/allmydata/scripts/create_node.py
src/allmydata/scripts/runner.py
src/allmydata/test/test_runner.py

index 4e23ac07ae54b9ebb564e78845f2b10d7ed813e1..65b18a6129adc83398655df44883daac205070b2 100644 (file)
@@ -2,6 +2,7 @@
 import os, sys
 from twisted.python import usage
 from allmydata.scripts.common import BasedirMixin, NoDefaultBasedirMixin
+import allmydata
 
 class CreateClientOptions(BasedirMixin, usage.Options):
     optParameters = [
@@ -29,7 +30,7 @@ client_tac = """
 # -*- python -*-
 
 import pkg_resources
-pkg_resources.require('allmydata-tahoe')
+pkg_resources.require('%s')
 pkg_resources.require('twisted')
 from allmydata import client
 from twisted.application import service
@@ -38,13 +39,13 @@ c = client.Client()
 
 application = service.Application("allmydata_client")
 c.setServiceParent(application)
-"""
+""" % (allmydata.__appname__,)
 
 introducer_tac = """
 # -*- python -*-
 
 import pkg_resources
-pkg_resources.require('allmydata-tahoe')
+pkg_resources.require('%s')
 pkg_resources.require('twisted')
 from allmydata import introducer
 from twisted.application import service
@@ -53,7 +54,7 @@ c = introducer.IntroducerNode()
 
 application = service.Application("allmydata_introducer")
 c.setServiceParent(application)
-"""
+""" % (allmydata.__appname__,)
 
 def write_node_config(c, config):
     # this is shared between clients and introducers
index 9db7d05ef7fc2b1bb8f87a125680c2003eff1853..f8c0a096710f6fee4587082b3e6e4b23a7654e1a 100644 (file)
@@ -6,7 +6,8 @@ import pkg_resources
 pkg_resources.require('twisted')
 from twisted.python import usage
 
-pkg_resources.require('allmydata-tahoe')
+import allmydata
+pkg_resources.require(allmydata.__appname__)
 from allmydata.scripts.common import BaseOptions
 from allmydata.scripts import debug, create_node, startstop_node, cli, keygen, stats_gatherer
 
index 53571a6289205600b073e7ddf75802de05699f03..346a32cab6e8ba92bd97646edbfce5f4d7332e68 100644 (file)
@@ -59,7 +59,7 @@ class BinTahoe(common_util.SignalMixin, unittest.TestCase, SkipMixin):
         def _cb(res):
             out, err, rc_or_sig = res
             self.failUnlessEqual(rc_or_sig, 0, res)
-            self.failUnless(out.startswith(allmydata.__appname__), res)
+            self.failUnless(out.startswith(allmydata.__appname__+':'), res)
             self.failIfIn("DeprecationWarning", out, res)
             self.failUnlessEqual(err, "", res)
         d.addCallback(_cb)