From 12b0c4bb99e285279209908d808250bfcdca5dc1 Mon Sep 17 00:00:00 2001 From: "Dr. Peter Poeml" Date: Thu, 20 Jul 2006 14:23:10 +0000 Subject: [PATCH] - fix creation of packages, which did no longer work since the latest changes in error handling (since editmeta needs to see the 404 to know that a package is to be created) - insert a newline after 'missing argument' messages --- NEWS | 2 ++ osc/commandline.py | 5 +++++ osc/core.py | 7 ++++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index d3cf6eac..48def6b0 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ since 0.7: ... +- fixed issue with uploading files when an intercepting web proxy was in between osc and the api server +- fixed creation of new packages/projects 0.7: - initial support for local builds (subcommand 'build') diff --git a/osc/commandline.py b/osc/commandline.py index c831e7ea..7975fecc 100755 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -64,6 +64,7 @@ usage: osc meta Apache # show meta of project 'Apache' if not args: print 'missing argument' + print print meta.func_doc sys.exit(1) @@ -88,6 +89,7 @@ usage: osc editmeta FooPrj # edit meta of project 'FooPrj' if not args: print 'missing argument' + print print meta.func_doc sys.exit(1) @@ -556,6 +558,7 @@ usage: osc buildinfo if args is None or len(args) < 2: print 'missing argument' + print print buildinfo.func_doc print 'Valid arguments for this package are:' print @@ -580,6 +583,7 @@ usage: osc buildconfig if args is None or len(args) < 2: print 'missing argument' + print print buildconfig.func_doc print 'Valid arguments for this package are:' print @@ -632,6 +636,7 @@ and set su-wrapper to 'sudo' in .oscrc. elif args is None or len(args) < 3: print 'missing argument' + print print build.func_doc print 'Valid arguments are:' print 'you have to choose a repo to build on' diff --git a/osc/core.py b/osc/core.py index 422a8b58..b2d1e1e1 100755 --- a/osc/core.py +++ b/osc/core.py @@ -434,7 +434,8 @@ rev: %s (fd, filename) = tempfile.mkstemp(prefix = 'osc_editmeta.', suffix = '.xml', dir = '/tmp') try: - m = show_package_meta(self.prjname, self.name) + u = makeurl(['source', self.prjname, self.name, '_meta']) + m = urllib2.urlopen(u).readlines() except urllib2.HTTPError, e: if e.code == 404: print 'package does not exist yet... creating it' @@ -809,7 +810,7 @@ def edit_meta(prj, pac): # package meta u = makeurl(['source', prj, pac, '_meta']) try: - m = show_package_meta(prj, pac) + m = urllib2.urlopen(u).readlines() except urllib2.HTTPError, e: if e.code == 404: m = new_package_templ % (pac, username) @@ -822,7 +823,7 @@ def edit_meta(prj, pac): # project meta u = makeurl(['source', prj, '_meta']) try: - m = show_project_meta(prj) + m = urllib2.urlopen(u).readlines() except urllib2.HTTPError, e: if e.code == 404: m = new_project_templ % (prj, username)