# HG changeset patch # User Sebastien Jodogne # Date 1638791964 -3600 # Node ID fe0671a4c145dda735dd0822bedd4754083a5e08 # Parent f478b78e58f3c16de992f793c15d1433ba1f60e1 update SyncOrthancFolder.py to use Python 3 diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/CMake/AutoGeneratedCode.cmake --- a/Resources/Orthanc/CMake/AutoGeneratedCode.cmake Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/CMake/AutoGeneratedCode.cmake Mon Dec 06 12:59:24 2021 +0100 @@ -2,6 +2,7 @@ # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium +# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/CMake/Compiler.cmake --- a/Resources/Orthanc/CMake/Compiler.cmake Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/CMake/Compiler.cmake Mon Dec 06 12:59:24 2021 +0100 @@ -2,6 +2,7 @@ # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium +# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/CMake/DownloadOrthancFramework.cmake --- a/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Mon Dec 06 12:59:24 2021 +0100 @@ -2,6 +2,7 @@ # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium +# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/CMake/DownloadPackage.cmake --- a/Resources/Orthanc/CMake/DownloadPackage.cmake Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/CMake/DownloadPackage.cmake Mon Dec 06 12:59:24 2021 +0100 @@ -2,6 +2,7 @@ # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium +# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/CMake/EmbedResources.py --- a/Resources/Orthanc/CMake/EmbedResources.py Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/CMake/EmbedResources.py Mon Dec 06 12:59:24 2021 +0100 @@ -4,6 +4,7 @@ # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium +# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/CMake/GoogleTestConfiguration.cmake --- a/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake Mon Dec 06 12:59:24 2021 +0100 @@ -2,6 +2,7 @@ # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium +# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h --- a/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Mon Dec 06 12:59:24 2021 +0100 @@ -3,6 +3,7 @@ * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics * Department, University Hospital of Liege, Belgium * Copyright (C) 2017-2021 Osimis S.A., Belgium + * Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/Plugins/OrthancPluginException.h --- a/Resources/Orthanc/Plugins/OrthancPluginException.h Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/Plugins/OrthancPluginException.h Mon Dec 06 12:59:24 2021 +0100 @@ -3,6 +3,7 @@ * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics * Department, University Hospital of Liege, Belgium * Copyright (C) 2017-2021 Osimis S.A., Belgium + * Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/Plugins/OrthancPluginsExports.cmake --- a/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake Mon Dec 06 12:59:24 2021 +0100 @@ -2,6 +2,7 @@ # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium +# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake --- a/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake Mon Dec 06 12:59:24 2021 +0100 @@ -2,6 +2,7 @@ # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium +# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake --- a/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake Mon Dec 06 12:59:24 2021 +0100 @@ -2,6 +2,7 @@ # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium +# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake --- a/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake Mon Dec 06 12:59:24 2021 +0100 @@ -2,6 +2,7 @@ # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium +# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License diff -r f478b78e58f3 -r fe0671a4c145 Resources/Orthanc/Toolchains/MinGWToolchain.cmake --- a/Resources/Orthanc/Toolchains/MinGWToolchain.cmake Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/Orthanc/Toolchains/MinGWToolchain.cmake Mon Dec 06 12:59:24 2021 +0100 @@ -2,6 +2,7 @@ # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium +# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License diff -r f478b78e58f3 -r fe0671a4c145 Resources/SyncOrthancFolder.py --- a/Resources/SyncOrthancFolder.py Thu Dec 02 13:03:45 2021 +0100 +++ b/Resources/SyncOrthancFolder.py Mon Dec 06 12:59:24 2021 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # This maintenance script updates the content of the "Orthanc" folder @@ -8,7 +8,7 @@ import multiprocessing import os import stat -import urllib2 +import urllib.request TARGET = os.path.join(os.path.dirname(__file__), 'Orthanc') PLUGIN_SDK_VERSION = '1.7.0' @@ -45,7 +45,7 @@ branch = x[0] source = x[1] target = os.path.join(TARGET, x[2]) - print target + print(target) try: os.makedirs(os.path.dirname(target)) @@ -54,9 +54,9 @@ url = '%s/%s/%s' % (REPOSITORY, branch, source) - with open(target, 'w') as f: + with open(target, 'wb') as f: try: - f.write(urllib2.urlopen(url).read()) + f.write(urllib.request.urlopen(url).read()) except: print('ERROR %s' % url) raise