#1: Typecast verify to bool
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
14b1f56fc9
commit
99e8577bd0
@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
|
import distutils.util
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
env = os.environ
|
env = os.environ
|
||||||
@ -14,7 +15,7 @@ def main():
|
|||||||
copy(nextcloudInstance, user, destinationPath, filecontent, password, protocol, verifyTls)
|
copy(nextcloudInstance, user, destinationPath, filecontent, password, protocol, verifyTls)
|
||||||
|
|
||||||
def copy(nc, user, pathtofile, 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__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user