]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix program name in --version output
authorIan Wienand <iwienand@redhat.com>
Wed, 3 Dec 2014 23:28:22 +0000 (10:28 +1100)
committerIan Wienand <iwienand@redhat.com>
Wed, 3 Dec 2014 23:42:25 +0000 (10:42 +1100)
Neutron currently outputs something like

---
$ neutron-server --version
%prog 11.el7ost
---

I'm guessing since Ied2acb37c366f1a45aed72b6b76f11e2de23828e when
oslo.config moved from optparse to argparse?

Change-Id: Ie51d2d1263a215390e106201b35902d6c401506d

neutron/common/config.py

index f8bd3949fe145a4b19ea73af5d15bd191f916959..84dbe761c8405be22fd395eae8396d36411c3264 100644 (file)
@@ -142,7 +142,7 @@ db_options.set_defaults(cfg.CONF,
 
 def init(args, **kwargs):
     cfg.CONF(args=args, project='neutron',
-             version='%%prog %s' % version.version_info.release_string(),
+             version='%%(prog)s %s' % version.version_info.release_string(),
              **kwargs)
 
     # FIXME(ihrachys): if import is put in global, circular import