All pastes #1080891 Raw Edit

Jemand

public diff v1 · immutable
#1080891 ·published 2008-07-23 16:29 UTC
rendered paste body
Index: core.py===================================================================--- core.py	(Revision 4510)+++ core.py	(Arbeitskopie)@@ -1573,7 +1573,7 @@ def show_package_meta(apiurl, prj, pac):         return f.readlines()     except urllib2.HTTPError, e:         e.osc_msg = 'Error getting meta for project \'%s\' package \'%s\'' % (prj, pac)-        raise+        raise oscerr.APIError(e.osc_msg)   def show_develproject(apiurl, prj, pac):Index: commandline.py===================================================================--- commandline.py	(Revision 4510)+++ commandline.py	(Arbeitskopie)@@ -521,17 +521,25 @@ class Osc(cmdln.Cmdln):          # create         if cmd == 'create':-            devloc = show_develproject(apiurl, dst_project, dst_package)-            if devloc \-                    and dst_project != devloc \-                    and src_project != devloc \-                    and not opts.nodevelproject:-                print """\+            if not opts.nodevelproject:+                devloc = None+                try:+                    devloc = show_develproject(apiurl, dst_project, dst_package)+                except oscerr.APIError, e:+                    print >>sys.stderr, """\+Warning: failed to fetch meta data for '%s' package '%s' (new package?) """ \+                        % (dst_project, dst_package)+                    pass++                if devloc \+                      and dst_project != devloc \+                      and src_project != devloc:+                          print """\ Sorry, but a different project, %s, is defined as the place where development of the package %s primarily takes place. Please submit there instead, or use --nodevelproject to force direct submission.""" \                     % (devloc, dst_package)-                sys.exit(1)+                          sys.exit(1)              result = create_submit_request(apiurl,                                            src_project, src_package,