Skip to content

Commit

Permalink
fix agent format on python2.6 error
Browse files Browse the repository at this point in the history
  • Loading branch information
guohongze committed Aug 27, 2017
1 parent 3e0732a commit e4c81f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install/client/adminset_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def post_data(url, data):
if r.text:
print r.text
else:
print("Server return http status code: {}".format(r.status_code))
print("Server return http status code: {0}".format(r.status_code))
except StandardError as msg:
print msg
return True
Expand Down Expand Up @@ -178,7 +178,7 @@ def asset_info_post():
print 'Get the hardwave infos from host:'
print asset_info()
print '----------------------------------------------------------'
post_data("http://{}/cmdb/collect".format(server_ip), asset_info())
post_data("http://{0}/cmdb/collect".format(server_ip), asset_info())
os.environ["LANG"] = osenv
return True

Expand Down Expand Up @@ -289,7 +289,7 @@ def agg_sys_info():
print sys_info
json_data = json.dumps(sys_info)
print '----------------------------------------------------------'
post_data("http://{}/monitor/received/sys/info/".format(server_ip), json_data)
post_data("http://{0}/monitor/received/sys/info/".format(server_ip), json_data)
return True


Expand Down

0 comments on commit e4c81f0

Please sign in to comment.