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

Merge pull request #921 from marcus-h/fix_ci_nonexistent_pkg

Handle "cd prj; osc ci non_existent_pkg" more gracefully
This commit is contained in:
Marco Strigl 2021-06-04 15:27:03 +02:00 committed by GitHub
commit 0c3164bc8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1032,7 +1032,7 @@ class Project:
p.commit(msg, verbose=verbose, skip_local_service_run=skip_local_service_run, can_branch=can_branch, force=force) p.commit(msg, verbose=verbose, skip_local_service_run=skip_local_service_run, can_branch=can_branch, force=force)
elif pac in self.pacs_unvers and not is_package_dir(os.path.join(self.dir, pac)): elif pac in self.pacs_unvers and not is_package_dir(os.path.join(self.dir, pac)):
print('osc: \'%s\' is not under version control' % pac) print('osc: \'%s\' is not under version control' % pac)
elif pac in self.pacs_broken: elif pac in self.pacs_broken or not os.path.exists(os.path.join(self.dir, pac)):
print('osc: \'%s\' package not found' % pac) print('osc: \'%s\' package not found' % pac)
elif state == None: elif state == None:
self.commitExtPackage(pac, msg, todo, verbose=verbose, skip_local_service_run=skip_local_service_run) self.commitExtPackage(pac, msg, todo, verbose=verbose, skip_local_service_run=skip_local_service_run)