Mercurial > hg > orthanc-tests
comparison GenerateConfigurationForTests.py @ 286:b55a7cb5ee02
change url to get configuration.json
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 20 Apr 2020 17:34:21 +0200 |
parents | 082f35cb4459 |
children | de6e73e4df60 |
comparison
equal
deleted
inserted
replaced
285:281a32ecc5c1 | 286:b55a7cb5ee02 |
---|---|
79 ip = socket.gethostbyname(socket.gethostname()) | 79 ip = socket.gethostbyname(socket.gethostname()) |
80 | 80 |
81 | 81 |
82 # Download the content of the default configuration file | 82 # Download the content of the default configuration file |
83 with open(args.target, 'w') as f: | 83 with open(args.target, 'w') as f: |
84 url = 'https://bitbucket.org/sjodogne/orthanc/raw/default/Resources/Configuration.json' | 84 url = 'https://hg.orthanc-server.com/orthanc/raw-file/default/Resources/Configuration.json' |
85 #url = 'https://bitbucket.org/sjodogne/orthanc/raw/default/Resources/Configuration.json' | |
85 http = urllib.urlopen(url) | 86 http = urllib.urlopen(url) |
86 if http.getcode() != 200: | 87 if http.getcode() != 200: |
87 raise Exception('Cannot download: %s' % url) | 88 raise Exception('Cannot download: %s' % url) |
88 | 89 |
89 f.write(http.read()) | 90 f.write(http.read()) |