Changeset 6d4a8bc in trunk for src/allmydata/scripts/common.py
- Timestamp:
- 2016-01-15T19:15:38Z (10 years ago)
- Branches:
- master
- Children:
- 6226f6b
- Parents:
- 41cf6008 (diff), f282445 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/allmydata/scripts/common.py ¶
r41cf6008 r6d4a8bc 58 58 59 59 def parseArgs(self, basedir=None): 60 if self.parent['node-directory'] and self['basedir']: 60 # This finds the node-directory option correctly even if we are in a subcommand. 61 root = self.parent 62 while root.parent is not None: 63 root = root.parent 64 65 if root['node-directory'] and self['basedir']: 61 66 raise usage.UsageError("The --node-directory (or -d) and --basedir (or -C) options cannot both be used.") 62 if self.parent['node-directory'] and basedir:67 if root['node-directory'] and basedir: 63 68 raise usage.UsageError("The --node-directory (or -d) option and a basedir argument cannot both be used.") 64 69 if self['basedir'] and basedir: … … 69 74 elif self['basedir']: 70 75 b = argv_to_abspath(self['basedir']) 71 elif self.parent['node-directory']:72 b = argv_to_abspath( self.parent['node-directory'])76 elif root['node-directory']: 77 b = argv_to_abspath(root['node-directory']) 73 78 elif self.default_nodedir: 74 79 b = self.default_nodedir … … 76 81 raise usage.UsageError("No default basedir available, you must provide one with --node-directory, --basedir, or a basedir argument") 77 82 self['basedir'] = b 83 self['node-directory'] = b 78 84 79 85 def postOptions(self):
Note: See TracChangeset
for help on using the changeset viewer.