878f880
From ae0b55de3bb2e8f2d6876140d6f4121af35e7b50 Mon Sep 17 00:00:00 2001
878f880
From: Frank Schreiner <schreiner@suse.de>
878f880
Date: Fri, 20 Dec 2019 08:36:08 +0100
878f880
Subject: [PATCH] fix broken importsrcpkg for python3
878f880
878f880
without this patch, `importsrcpkg` breaks with the following output:
878f880
878f880
```
878f880
  File "/usr/lib/python3.7/site-packages/osc/commandline.py", line 7868, in do_importsrcpkg
878f880
    createPackageDir(os.path.join(project.dir, pac), project)
878f880
  File "/usr/lib64/python3.7/posixpath.py", line 94, in join
878f880
    genericpath._check_arg_types('join', a, *p)
878f880
  File "/usr/lib64/python3.7/genericpath.py", line 151, in _check_arg_types
878f880
    raise TypeError("Can't mix strings and bytes in path components") from None
878f880
TypeError: Can't mix strings and bytes in path components
878f880
```
878f880
878f880
Fixes #712
878f880
---
878f880
 osc/commandline.py | 2 +-
878f880
 1 file changed, 1 insertion(+), 1 deletion(-)
878f880
878f880
diff --git a/osc/commandline.py b/osc/commandline.py
878f880
index 78e66e0..ba57985 100644
878f880
--- a/osc/commandline.py
878f880
+++ b/osc/commandline.py
878f880
@@ -7860,7 +7860,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
878f880
             print('please specify a package name with the \'--name\' option. ' \
878f880
                                 'The automatic detection failed', file=sys.stderr)
878f880
             sys.exit(1)
878f880
-
878f880
+        pac = pac.decode()
878f880
         if conf.config['do_package_tracking']:
878f880
             createPackageDir(os.path.join(project.dir, pac), project)
878f880
         else:
878f880
-- 
878f880
2.23.0
878f880