Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
fix Python3.x test.case
Browse files Browse the repository at this point in the history
  • Loading branch information
FeeiCN committed Aug 14, 2017
1 parent 6c2cd8a commit fb21d1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cobra/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,9 @@ def path_to_file(path):
:return:
"""
paths = path.split('/')
paths = filter(None, paths)
return '.../{0}'.format(paths[len(paths) - 1])
paths = list(filter(None, paths))
length = len(paths)
return '.../{0}'.format(paths[length - 1])


def percent(part, whole, need_per=True):
Expand Down

0 comments on commit fb21d1a

Please sign in to comment.