# HG changeset patch # User Sebastien Jodogne # Date 1667398026 -3600 # Node ID 1bb0a97168762d2c77308ce45439beab0cf8f3a1 # Parent e943a84da9ac14a2c577886165398756b5b7e826 cppcheck diff -r e943a84da9ac -r 1bb0a9716876 OrthancStone/Resources/SyncOrthancFolder.py --- a/OrthancStone/Resources/SyncOrthancFolder.py Wed Nov 02 14:56:35 2022 +0100 +++ b/OrthancStone/Resources/SyncOrthancFolder.py Wed Nov 02 15:07:06 2022 +0100 @@ -29,7 +29,13 @@ import multiprocessing import os import stat -import urllib2 +import sys + +if sys.version_info[0] < 3: + from urllib import urlopen +else: + from urllib.request import urlopen + TARGET = os.path.join(os.path.dirname(__file__), 'Orthanc') REPOSITORY = 'https://hg.orthanc-server.com/orthanc/raw-file' @@ -54,7 +60,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)) @@ -63,8 +69,8 @@ url = '%s/%s/%s' % (REPOSITORY, branch, source) - with open(target, 'w') as f: - f.write(urllib2.urlopen(url).read()) + with open(target, 'wb') as f: + f.write(urlopen(url).read()) commands = [] diff -r e943a84da9ac -r 1bb0a9716876 OrthancStone/Sources/Scene2D/AnnotationsSceneLayer.cpp --- a/OrthancStone/Sources/Scene2D/AnnotationsSceneLayer.cpp Wed Nov 02 14:56:35 2022 +0100 +++ b/OrthancStone/Sources/Scene2D/AnnotationsSceneLayer.cpp Wed Nov 02 15:07:06 2022 +0100 @@ -1382,7 +1382,7 @@ } public: - ProbingAnnotation(AnnotationsSceneLayer& that) : + explicit ProbingAnnotation(AnnotationsSceneLayer& that) : Annotation(that), probedLayer_(that.GetProbedLayer()), probeChanged_(true),