# HG changeset patch # User Sebastien Jodogne # Date 1706699900 -3600 # Node ID ec657d1a62a6c5eebfe5255a8afe082e92d973c1 # Parent a8e49d30f6347163089d0612303da7694fbb133c fix compatibility with python3 diff -r a8e49d30f634 -r ec657d1a62a6 Plugins/CGet/Run.py --- a/Plugins/CGet/Run.py Wed Jan 31 11:36:37 2024 +0100 +++ b/Plugins/CGet/Run.py Wed Jan 31 12:18:20 2024 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics diff -r a8e49d30f634 -r ec657d1a62a6 Plugins/Recycling/Run.py --- a/Plugins/Recycling/Run.py Wed Jan 31 11:36:37 2024 +0100 +++ b/Plugins/Recycling/Run.py Wed Jan 31 12:18:20 2024 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics diff -r a8e49d30f634 -r ec657d1a62a6 Plugins/WebDav/Run.py --- a/Plugins/WebDav/Run.py Wed Jan 31 11:36:37 2024 +0100 +++ b/Plugins/WebDav/Run.py Wed Jan 31 12:18:20 2024 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics @@ -415,7 +415,7 @@ def test_upload_zip(self): - f = StringIO() + f = BytesIO() with zipfile.ZipFile(f, 'w') as z: z.writestr('hello/world/invalid.txt', 'Hello world') with open(GetDatabasePath('DummyCT.dcm'), 'rb') as g: diff -r a8e49d30f634 -r ec657d1a62a6 Tests/CheckDicomTls.py --- a/Tests/CheckDicomTls.py Wed Jan 31 11:36:37 2024 +0100 +++ b/Tests/CheckDicomTls.py Wed Jan 31 12:18:20 2024 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics diff -r a8e49d30f634 -r ec657d1a62a6 Tests/CheckHttpServerSecurity.py --- a/Tests/CheckHttpServerSecurity.py Wed Jan 31 11:36:37 2024 +0100 +++ b/Tests/CheckHttpServerSecurity.py Wed Jan 31 12:18:20 2024 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics diff -r a8e49d30f634 -r ec657d1a62a6 Tests/CheckIngestTranscoding.py --- a/Tests/CheckIngestTranscoding.py Wed Jan 31 11:36:37 2024 +0100 +++ b/Tests/CheckIngestTranscoding.py Wed Jan 31 12:18:20 2024 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics diff -r a8e49d30f634 -r ec657d1a62a6 Tests/CheckScuTranscoding.py --- a/Tests/CheckScuTranscoding.py Wed Jan 31 11:36:37 2024 +0100 +++ b/Tests/CheckScuTranscoding.py Wed Jan 31 12:18:20 2024 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics diff -r a8e49d30f634 -r ec657d1a62a6 Tests/CheckZipStreams.py --- a/Tests/CheckZipStreams.py Wed Jan 31 11:36:37 2024 +0100 +++ b/Tests/CheckZipStreams.py Wed Jan 31 12:18:20 2024 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/python2.7 +#!/usr/bin/env python3 # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics @@ -136,7 +136,7 @@ except Exception as e: Assert(streaming == False) - Assert(e[0] == 500) # HTTP status code 500 + Assert(e.args[0] == 500) # HTTP status code 500 print('ok, got none archive') queue.put(True)