Commit f994c4d1 authored by ibuler's avatar ibuler

fix(connect.py) 修复max引起的异常

已经修复
parent 5fab276c
......@@ -518,7 +518,10 @@ class Nav(object):
@staticmethod
def get_max_asset_property_length(assets, property_='hostname'):
return max([len(getattr(asset, property_)) for asset in assets])
try:
return max([len(getattr(asset, property_)) for asset in assets])
except ValueError:
return 30
def print_search_result(self):
hostname_max_length = self.get_max_asset_property_length(self.search_result)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment