Skip to content

Commit

Permalink
elbeproject: make a string from builddir parameter
Browse files Browse the repository at this point in the history
prevents a failure down the road due to paths being unicode:

Traceback (most recent call last):
  File "/var/cache/elbe/devel/elbepack/asyncworker.py", line 86, in execute
    self.project.build(skip_pkglist=True, build_bin=self.build_bin, build_sources=self.build_src)
  File "/var/cache/elbe/devel/elbepack/elbeproject.py", line 216, in build
    reportpath, self.targetfs )
  File "/var/cache/elbe/devel/elbepack/dump.py", line 193, in elbe_report
    mt_index = targetfs.mtime_snap()
  File "/var/cache/elbe/devel/elbepack/filesystem.py", line 170, in mtime_snap
    for fpath, realpath in self.walk_files(dirname,exclude_dirs):
  File "/var/cache/elbe/devel/elbepack/filesystem.py", line 148, in walk_files
    for dirpath, dirnames, filenames in os.walk(dirname):
  File "/usr/lib/python2.7/os.py", line 294, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 294, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 294, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 284, in walk
    if isdir(join(top, name)):
  File "/usr/lib/python2.7/posixpath.py", line 80, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 35: ordinal not in range(128)


Signed-off-by: Torben Hohn <torbenh@linutronix.de>
  • Loading branch information
torbenh3 committed Oct 13, 2015
1 parent c602b00 commit 69c0398
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elbepack/elbeproject.py
Expand Up @@ -54,7 +54,7 @@ def __init__ (self, builddir, xmlpath = None, logpath = None, name = None,
skip_urlcheck = False, rpcaptcache_notifier = None,
private_data = None, postbuild_file = None, presh_file = None,
postsh_file = None, savesh_file = None):
self.builddir = os.path.abspath(builddir)
self.builddir = os.path.abspath(str(builddir))
self.chrootpath = os.path.join(self.builddir, "chroot")
self.targetpath = os.path.join(self.builddir, "target")

Expand Down

0 comments on commit 69c0398

Please sign in to comment.