Projet

Général

Profil

0003-handling-metadata-from-the-web.patch

Serghei Mihai, 17 décembre 2014 15:42

Télécharger (1,21 ko)

Voir les différences:

Subject: [PATCH 3/3] handling metadata from the web

 authentic2/saml/management/commands/sync-metadata.py | 3 +++
 1 file changed, 3 insertions(+)
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
-