Skip to content

Commit

Permalink
Check whether project_dir points to a project wc (in do_importsrcpkg)
Browse files Browse the repository at this point in the history
If we abort early, the user gets a more meaningful error message.

Fixes: #301 ("Inconsistent working copy")
  • Loading branch information
marcus-h committed Jun 29, 2017
1 parent a8612f4 commit ffe68fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -7493,6 +7493,9 @@ def do_importsrcpkg(self, subcmd, opts, srpm):
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:
Expand Down

0 comments on commit ffe68fd

Please sign in to comment.