Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix header problem and Windows compile issues #14

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 43 additions & 8 deletions package-win-linux/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,49 @@

origIsSystemDLL = py2exe.build_exe.isSystemDLL
def isSystemDLL(pathname):
if os.path.basename(pathname).lower() in ("msvcp71.dll", "gdiplus.dll", "msvcp90.dll"):
return 0
return origIsSystemDLL(pathname)
if os.path.basename(pathname).lower() in ("msvcp71.dll", "gdiplus.dll", "msvcp90.dll"):
return 0
return origIsSystemDLL(pathname)
py2exe.build_exe.isSystemDLL = isSystemDLL

setup(name = "EQUELLA Bulk Importer (EBI)",
version = ebi.Version,
windows=[{"script":"ebi.py","icon_resources":[(0x0004,"ebismall.ico")],"copyright":"Copyright (c) 2014 Pearson plc. All rights reserved."}],
description = "EQUELLA Bulk Importer for uploading content into the EQUELLA(R) content management system",
)
setup(
name = "EQUELLA Bulk Importer (EBI)",
version = ebi.Version,
windows=[{"script":"ebi.py","icon_resources":[(0x0004,"ebismall.ico")],"copyright":"Copyright (c) 2014 Pearson plc. All rights reserved."}],
options={
'py2exe': {
"dll_excludes": [
"MSVCP90.dll",
"api-ms-win-core-string-l1-1-0.dll",
"api-ms-win-core-string-obsolete-l1-1-0.dll",
"api-ms-win-core-com-l1-1-0.dll",
"api-ms-win-core-sysinfo-l1-1-0.dll",
"api-ms-win-core-debug-l1-1-0.dll",
"api-ms-win-core-profile-l1-1-0.dll",
"api-ms-win-core-synch-l1-2-0.dll",
"api-ms-win-core-synch-l1-1-0.dll",
"api-ms-win-core-errorhandling-l1-1-0.dll",
"api-ms-win-core-libraryloader-l1-2-0.dll",
"api-ms-win-core-delayload-l1-1-1.dll",
"api-ms-win-core-delayload-l1-1-0.dll",
"api-ms-win-core-processthreads-l1-1-0.dll",
"api-ms-win-core-processenvironment-l1-1-0.dll",
"api-ms-win-eventing-provider-l1-1-0.dll",
"api-ms-win-core-file-l1-1-0.dll",
"api-ms-win-core-memory-l1-1-0.dll",
"api-ms-win-core-threadpool-l1-2-0.dll",
"api-ms-win-core-localization-l1-2-0.dll",
"api-ms-win-core-handle-l1-1-0.dll",
"api-ms-win-core-kernel32-legacy-l1-1-0.dll",
"api-ms-win-core-heap-l1-1-0.dll",
"api-ms-win-core-heap-l2-1-0.dll",
"api-ms-win-core-heap-obsolete-l1-1-0.dll",
"api-ms-win-security-base-l1-1-0.dll",
"api-ms-win-core-libraryloader-l1-2-1.dll",
"api-ms-win-core-rtlsupport-l1-1-0.dll"
]
}
},
description = "EQUELLA Bulk Importer for uploading content into the EQUELLA(R) content management system",
)

14 changes: 12 additions & 2 deletions source/equellaclient41.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,21 @@ def _call (self, name, args, returns=1, facade=SOAP_ENDPOINT_V41, ns='http://soa
responseInfo = response.info()
headers = {}
cookie = responseInfo.getheader('set-cookie')

added_cookie = []
for cookie_name in self._cookieJar:
name = cookie_name.upper().split("=")[0].strip()
if ";" in name:
name = name.split(";")[1].strip()
added_cookie.append(name)

if cookie is not None:
for cookie_part in cookie.split(','):
for cookie_name in cookie_part.split(','):
if not cookie_name.upper().split("=")[0].strip() in ["PATH", "DOMAIN", "EXPIRES", "SECURE",
"HTTPONLY"]:
name = cookie_name.upper().split("=")[0].strip()
if ";" in name:
name = name.split(";")[1].strip()
if not name in ["PATH", "DOMAIN", "EXPIRES", "SECURE", "HTTPONLY"] and not name in added_cookie:
# save cookie
self._cookieJar.append(cookie_name)

Expand Down