rel-eng/packages/spacewalk-utils | 2 +-
utils/spacewalk-common-channels | 12 +++++++-----
utils/spacewalk-utils.spec | 5 ++++-
3 files changed, 12 insertions(+), 7 deletions(-)
New commits:
commit 3b76a22301c9ddb7e147e36a7fce4be555809c9a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Feb 22 15:16:28 2010 +0100
Automatic commit of package [spacewalk-utils] release [0.9.4-1].
diff --git a/rel-eng/packages/spacewalk-utils b/rel-eng/packages/spacewalk-utils
index 4f6b2df..e2c6753 100644
--- a/rel-eng/packages/spacewalk-utils
+++ b/rel-eng/packages/spacewalk-utils
@@ -1 +1 @@
-0.9.3-1 utils/
+0.9.4-1 utils/
diff --git a/utils/spacewalk-utils.spec b/utils/spacewalk-utils.spec
index 4bc807b..8b6bce7 100644
--- a/utils/spacewalk-utils.spec
+++ b/utils/spacewalk-utils.spec
@@ -1,7 +1,7 @@
%define rhnroot %{_prefix}/share/rhn
Name: spacewalk-utils
-Version: 0.9.3
+Version: 0.9.4
Release: 1%{?dist}
Summary: Utilities that may be run against a Spacewalk server.
@@ -57,6 +57,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Feb 22 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.4-1
+- emulate epilog in optparse on RHEL5 (python 2.4)
+
* Wed Feb 17 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.3-1
- fixed of spacewalk-common-channels
commit 091a71cb0d96761c570b1249f9362bddd858de1f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Feb 22 15:14:30 2010 +0100
emulate epilog in optparse on RHEL5 (python 2.4)
diff --git a/utils/spacewalk-common-channels b/utils/spacewalk-common-channels
index 8b55880..2f3f64b 100755
--- a/utils/spacewalk-common-channels
+++ b/utils/spacewalk-common-channels
@@ -47,10 +47,11 @@ channel_arch = {
SPLIT_PATTERN = '[ ,]+'
-# extend OptionParser not to reformat epilog
+# extend OptionParser to print examples
class xOptionParser(OptionParser):
- def format_epilog(self, formatter):
- return "\n\n" + self.epilog
+ def print_help(self):
+ OptionParser.print_help(self)
+ print "\n\n" + self.examples
def connect(user, password, server):
server_url = "http://%s/rpc/api" % server
@@ -97,7 +98,7 @@ def add_channels(channels, section, arch):
if __name__ == "__main__":
# options parsing
usage = "usage: %prog [options] <channel1 glob> [<channel2 glob> ...
]"
- epilog = """Examples:
+ examples = """Examples:
Create Fedora 12 channel, its child channels and activation key limited to 10 servers:
%(prog)s -u admin -p pass -k 10 'fedora12*'
@@ -131,7 +132,8 @@ Create everything as well as unlimited activation key for every
channel:
action="store_true"),
]
- parser = xOptionParser(usage=usage, epilog=epilog, option_list=option_list)
+ parser = xOptionParser(usage=usage, option_list=option_list)
+ parser.examples = examples
(options, args) = parser.parse_args()
config = ConfigParser.ConfigParser()
config.read(options.config)
Show replies by date