scm: Accept unicode as local path

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-08-14 14:35:58 +02:00
parent 7e03133c8f
commit 22fdd59ca4
1 changed files with 2 additions and 2 deletions

View File

@ -226,7 +226,7 @@ def get_file_from_scm(scm_dict, target_path, logger=None):
>>> get_file_from_scm(scm_dict, target_path) >>> get_file_from_scm(scm_dict, target_path)
['/tmp/path/share/variants.dtd'] ['/tmp/path/share/variants.dtd']
""" """
if isinstance(scm_dict, str): if isinstance(scm_dict, basestring):
scm_type = "file" scm_type = "file"
scm_repo = None scm_repo = None
scm_file = os.path.abspath(scm_dict) scm_file = os.path.abspath(scm_dict)
@ -279,7 +279,7 @@ def get_dir_from_scm(scm_dict, target_path, logger=None):
>>> get_dir_from_scm(scm_dict, target_path) >>> get_dir_from_scm(scm_dict, target_path)
['/tmp/path/share/variants.dtd', '/tmp/path/share/rawhide-fedora.ks', ...] ['/tmp/path/share/variants.dtd', '/tmp/path/share/rawhide-fedora.ks', ...]
""" """
if isinstance(scm_dict, str): if isinstance(scm_dict, basestring):
scm_type = "file" scm_type = "file"
scm_repo = None scm_repo = None
scm_dir = os.path.abspath(scm_dict) scm_dir = os.path.abspath(scm_dict)