mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-09-18 17:20:57 +02:00
2021-12-03 Fred Gleason <fredg@paravelsystems.com>
* Modified the 'rivwebpyapi' so as to require only scheme and host parts of the URL provided to the 'url' parameter. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
04ea0f0ca6
commit
14caa317e0
@ -22612,3 +22612,6 @@
|
|||||||
2021-11-11 Fred Gleason <fredg@paravelsystems.com>
|
2021-11-11 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Removed debugging code from 'web/rdxport/carts.cpp'.
|
* Removed debugging code from 'web/rdxport/carts.cpp'.
|
||||||
* Removed debugging code from 'apis/rivwebpyapi/api/rivwebpyapi.py'.
|
* Removed debugging code from 'apis/rivwebpyapi/api/rivwebpyapi.py'.
|
||||||
|
2021-12-03 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Modified the 'rivwebpyapi' so as to require only scheme and host
|
||||||
|
parts of the URL provided to the 'url' parameter.
|
||||||
|
@ -23,6 +23,7 @@ import sys
|
|||||||
import datetime
|
import datetime
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import requests
|
import requests
|
||||||
|
from urllib.parse import urlparse
|
||||||
from xml.sax.handler import ContentHandler
|
from xml.sax.handler import ContentHandler
|
||||||
import xml.sax
|
import xml.sax
|
||||||
|
|
||||||
@ -186,14 +187,22 @@ class rivwebpyapi(object):
|
|||||||
Takes three arguments:
|
Takes three arguments:
|
||||||
|
|
||||||
url - The URL of the service. Typically of the form
|
url - The URL of the service. Typically of the form
|
||||||
'http://rivendell.example.com/rd-bin/rdxport.cgi' (string).
|
'http://rivendell.example.com' (string).
|
||||||
|
|
||||||
username - The Rivendell Username to connect as (string).
|
username - The Rivendell Username to connect as (string).
|
||||||
|
|
||||||
password - The password for the specified Rivendell Username
|
password - The password for the specified Rivendell Username
|
||||||
(string).
|
(string).
|
||||||
"""
|
"""
|
||||||
self.__connection_url=url
|
#
|
||||||
|
# Normalize the URL
|
||||||
|
#
|
||||||
|
parsed_url=urlparse(url)
|
||||||
|
parsed_url=parsed_url._replace(path='/rd-bin/rdxport.cgi',
|
||||||
|
params='',
|
||||||
|
query='',
|
||||||
|
fragment='')
|
||||||
|
self.__connection_url=parsed_url.geturl()
|
||||||
self.__connection_username=username
|
self.__connection_username=username
|
||||||
self.__connection_password=password
|
self.__connection_password=password
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user