mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:29:02 +02:00
import_otherdistro: try-specfile: handle files in current dir
The try-specfile subcommand is for testing, so it's entirely possible the spec file we are testing with will be in the current directory; os.path.dirname() returns '' in this case, which os.path.relpath() then chokes on. Avoid this in the easiest way possible by just prepending ./ to the path in this case. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
4902baa1d7
commit
c427f82bfd
|
@ -603,6 +603,9 @@ def try_specfile(args):
|
|||
return ret
|
||||
|
||||
specfile = args.specfile
|
||||
# Hack to handle files in the current directory
|
||||
if not os.sep in specfile:
|
||||
specfile = '.' + os.sep + specfile
|
||||
metapath = os.path.dirname(specfile)
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue
Block a user