#1: Typecast verify to bool
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
katharina 2021-12-04 18:46:59 +01:00
parent 14b1f56fc9
commit 99e8577bd0

View File

@ -1,5 +1,6 @@
import os
import requests
import distutils.util
def main():
env = os.environ
@ -14,7 +15,7 @@ def main():
copy(nextcloudInstance, user, destinationPath, filecontent, password, protocol, verifyTls)
def copy(nc, user, pathtofile, filecontent, password, protocol, verifyTls):
journey = requests.put(protocol + "://" + nc + "/remote.php/dav/files/" + user + "/" + pathtofile, data=filecontent, auth=(user, password), verify=verifyTls)
journey = requests.put(protocol + "://" + nc + "/remote.php/dav/files/" + user + "/" + pathtofile, data=filecontent, auth=(user, password), verify=distutils.util.strtobool(verifyTls))
if __name__ == "__main__":
main()