From 06a6538ac729bf2b1a8a6fde17f5321d6eefd5be Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Aug 29 2019 20:15:42 +0000 Subject: use dirname when creating ostree ref directories We want the directory, not the base filename. Signed-off-by: Dusty Mabe --- diff --git a/robosignatory/work.py b/robosignatory/work.py index da59728..5fd2ad4 100644 --- a/robosignatory/work.py +++ b/robosignatory/work.py @@ -49,10 +49,10 @@ def process_atomic(signer, ref, commitid, key, directory, doref=True): log.info('Previous commit for %s: %s' % (ref, f.read().replace('\n', ''))) - basename_refpath = os.path.basename(refpath) - if doref and not os.path.exists(basename_refpath): + dirname_refpath = os.path.dirname(refpath) + if doref and not os.path.exists(dirname_refpath): log.info("Creating the directories for the refpath") - os.makedirs(basename_refpath) + os.makedirs(dirname_refpath) if doref: log.info('Writing %s to %s' % (commitid, refpath))