policycheck: Check if packaging/ directory exist
authorEd Bartosh <eduard.bartosh@intel.com>
Sun, 8 Dec 2013 11:30:23 +0000 (13:30 +0200)
committerGerrit Code Review <gerrit2@otctools.fi.intel.com>
Tue, 10 Dec 2013 09:20:50 +0000 (11:20 +0200)
commit189c87c07c48f3dd1da63d67c3c8cad3767b52a1
tree5a24377cf9b2138a7a70fd2d09c2cbb618a9ad9c
parent8df30e432c8cc759428609bf9a39ef86b28eee20
policycheck: Check if packaging/ directory exist

if there is no packaging/ directory in the project policycheck should
fail and send message back to Gerrit.

Currently if project doesn't have packaging directory job produces
non-informative traceback:
Traceback (most recent call last):
  File "jenkins-scripts/job_policycheck.py", line 196, in <module>
    sys.exit(main())
  File "jenkins-scripts/job_policycheck.py", line 172, in main
    if not export(prjdir, packagingdir, mygit, events, mygerrit):
  File "jenkins-scripts/job_policycheck.py", line 62, in export
    tempd = tempfile.mkdtemp(dir=os.path.join(prjdir, packagingdir))
  File "/usr/lib64/python2.7/tempfile.py", line 318, in mkdtemp
    _os.mkdir(file, 0700)

and doesn't report anything back to submitter.

Fixes: #1526

Change-Id: Ic98c26e04c45ff22eeb9136acfe006159d9eff5c
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
job_policycheck.py