summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/control8
-rwxr-xr-xdebian/rules6
-rw-r--r--grandlyon_cartads_cs/models.py10
3 files changed, 19 insertions, 5 deletions
diff --git a/debian/control b/debian/control
index 7e2b710..0e22dcc 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: passerelle-grandlyon-cartads-cs
Maintainer: Frederic Peters <fpeters@entrouvert.com>
Section: python
Priority: optional
-Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 9), dh-python, python-django
+Build-Depends: python-setuptools, python3-setuptools, python-all, python3-all, debhelper (>= 9), dh-python, python-django, python3-django
Standards-Version: 3.9.1
Package: python-passerelle-grandlyon-cartads-cs
@@ -10,3 +10,9 @@ Architecture: all
Depends: ${misc:Depends}, ${python:Depends}, python-passerelle
Description: Passerelle connector to Grand Lyon Cart@DS
.
+
+Package: python3-passerelle-grandlyon-cartads-cs
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}, python3-passerelle
+Description: Passerelle connector to Grand Lyon Cart@DS (Python 3)
+ .
diff --git a/debian/rules b/debian/rules
index 4647c9c..2a47d5e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,4 +1,8 @@
#!/usr/bin/make -f
+export PYBUILD_NAME=passerelle-grandlyon-cartads-cs
+
%:
- dh $@ --with python2
+ dh $@ --with python2,python3 --buildsystem=pybuild
+
+override_dh_auto_test:
diff --git a/grandlyon_cartads_cs/models.py b/grandlyon_cartads_cs/models.py
index 7de8e6f..46e963e 100644
--- a/grandlyon_cartads_cs/models.py
+++ b/grandlyon_cartads_cs/models.py
@@ -85,13 +85,13 @@ class GLCartaDSCS(AbstractCartaDSCS):
return token
def upload_zip(self, zip_filename):
- b64_zip = base64.b64encode(open(zip_filename).read())
+ b64_zip = base64.b64encode(open(zip_filename, 'rb').read())
chunk_size = 16777216 # 16MB
for n in range(0, len(b64_zip), chunk_size):
resp = self.requests.post(self.sendfile_ws_url,
data={
'fileName': self.sendfile_ws_dirname + os.path.basename(zip_filename),
- 'b64_fileContent': b64_zip[n:n+chunk_size],
+ 'b64_fileContent': b64_zip[n:n+chunk_size].decode('ascii'),
}
)
resp.raise_for_status()
@@ -120,7 +120,7 @@ class GLCartaDSCS(AbstractCartaDSCS):
dossier = CartaDSDossier.objects.get(
zip_ready=True,
zip_sent=True,
- zip_ack_response='True',
+ zip_ack_response__in=('True', '0'),
cartads_id_dossier__isnull=True,
tracking_code=tracking_code,
id=dossier_id)
@@ -149,6 +149,8 @@ class GLCartaDSCS(AbstractCartaDSCS):
u"Attente réponse des services": u"En cours d'instruction",
u"Attente consultation des services conformité": u"En cours d'instruction",
u"Attente décision de l'autorité": u"En cours d'instruction",
+ u"Réponse des services": u"En cours d'instruction",
+ u"Dossier complété": u"En cours d'instruction",
u"Attente DOC": u"Attente ouverture de chantier",
u"Attente DAACT": u"Attente achèvement des travaux",
u"Attente conformité": u"Attente étude conformité",
@@ -157,6 +159,8 @@ class GLCartaDSCS(AbstractCartaDSCS):
u"Dossier terminé": u"Dossier terminé",
u"Prorogation": u"Dossier terminé",
u"Recours gracieux": u"Dossier terminé",
+ u"Dossier transfert": u"Dossier terminé",
+ u"Dossier modificatif": u"Dossier terminé",
u"Contentieux": u"Dossier terminé",
}.get(response['status_label'], '')
return response