0003-handling-metadata-from-the-web.patch
authentic2/saml/management/commands/sync-metadata.py | ||
---|---|---|
2 | 2 |
import sys |
3 | 3 |
import xml.etree.ElementTree as etree |
4 | 4 |
import os |
5 |
import urllib2 |
|
5 | 6 | |
6 | 7 |
from authentic2.compat_lasso import lasso |
7 | 8 |
from django.core.management.base import BaseCommand, CommandError |
... | ... | |
247 | 248 |
raise CommandError('--source MUST be an ASCII string value') |
248 | 249 |
try: |
249 | 250 |
metadata_file = file(args[0]) |
251 |
except IOError: |
|
252 |
metadata_file = urllib2.urlopen(args[0]) |
|
250 | 253 |
except: |
251 | 254 |
raise CommandError('Unable to open file %s' % args[0]) |
252 | 255 |
try: |
253 |
- |