1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 14:56:14 +01:00

Check whether project_dir points to a project wc (in do_importsrcpkg)

If we abort early, the user gets a more meaningful error message.

Fixes: #301 ("Inconsistent working copy")
This commit is contained in:
Marcus Huewe 2017-06-29 14:09:37 +02:00
parent a8612f4ecc
commit ffe68fd9f4

View File

@ -7493,6 +7493,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
else:
project_dir = os.curdir
if not is_project_dir(project_dir):
raise oscerr.WrongArgs("'%s' is no project working copy" % project_dir)
if conf.config['do_package_tracking']:
project = Project(project_dir)
else: