From: Dan Mick Date: Thu, 30 May 2013 23:47:48 +0000 (-0700) Subject: ceph: remove global declarations, declare verbose and cluster near top X-Git-Tag: v0.65~136^2^2~36 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=456f96f95719985a76a1b73b79326c1febdd5d35;p=ceph.git ceph: remove global declarations, declare verbose and cluster near top Signed-off-by: Dan Mick --- diff --git a/src/ceph b/src/ceph index a85f01c3f33..5c03e3c7645 100755 --- a/src/ceph +++ b/src/ceph @@ -17,7 +17,10 @@ import sys import types import uuid +# just a couple of globals + verbose = False +cluster = None class ArgumentError(Exception): """ @@ -277,7 +280,6 @@ class CephPoolname(CephArgtype): Pool name; checked for presence in cluster """ def valid(self, s, partial=False): - global cluster if cluster.pool.exists(s): raise ArgumentValid("pool {0} does not exist".format(s)) self.val = s @@ -1057,8 +1059,6 @@ def json_command(target=('mon', ''), prefix=None, argdict=None, inbuf='', If target is osd.N, send command to that osd (except for pgid cmds) """ - global cluster - global verbose cmddict = {} if prefix: cmddict.update({'prefix':prefix}) @@ -1297,11 +1297,9 @@ def complete(sigdict, args, target): ### def main(): - global cluster parsed_args, childargs = parse_cmdargs(first=False) - global verbose verbose = parsed_args.verbose # pass on --id, --name, -k, -c