Skip to content

Commit

Permalink
Fixing Upload Items
Browse files Browse the repository at this point in the history
  • Loading branch information
chalbersma committed Dec 18, 2019
1 parent 434242f commit 450defb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions saltcell/clientcollector.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ def eval_upload(self):
self.logger.warning("Not uploading as noupload option specified at runtime, ignoring confiuration.")
elif isinstance(self.sapi_configs, dict) and self.sapi_configs.get("sapi_do_api", False) is False:
self.logger.warning("Not Uploading as sapi_do_api turned off in configs.")
elif "sapi_endpoint" not in self.sapi_configs.keys():
self.logger.error("Not Uploading as sapi_endpoint not set.")
else:
# It's Turned on
post_data = self.todict()
Expand All @@ -116,7 +114,7 @@ def eval_upload(self):
if "sapi_token" in this_endpoint.keys() and "sapi_username" in this_endpoint.keys():
headers["Authorization"] = "{}:{}".format(str(this_endpoint["sapi_username"]), this_endpoint["sapi_token"])
else:
self.logger.warning("sapi_username and/or sapi_token not set in config. No Auth added (normally).")
self.logger.warning("sapi_username and/or sapi_token not set in config. No Default Auth added (normally).")

headers.update(this_endpoint.get("custom_headers", {}))

Expand Down

0 comments on commit 450defb

Please sign in to comment.