linted file
authorbellierp
Fri, 21 Apr 2017 15:41:43 +0200
changeset 342 c67af29cd199
parent 341 6429b9a65264
child 343 298bc0bb0190
linted file
src/ldtplatform/management/commands/importweb.py
--- a/src/ldtplatform/management/commands/importweb.py	Fri Apr 21 15:34:25 2017 +0200
+++ b/src/ldtplatform/management/commands/importweb.py	Fri Apr 21 15:41:43 2017 +0200
@@ -50,6 +50,13 @@
     '''
     command
     '''
+    def __init__(self, *args, **kwargs):
+        super(Command, self).__init__(*args, **kwargs)
+        self.parser = None
+        self.myfile = None
+        self.writefile = None
+        self.durations = None
+
     def add_arguments(self, parser):
         '''
         add arguments
@@ -169,9 +176,9 @@
                 myfrontproj.save()
                 self.stdout.write("%s done"%title)
                 self.writefile.writerow([mysource,
-                                        models.Content.objects.get(title=title).iri_id,
-                                        title.encode('utf-8') if title else '',
-                                        myfrontproj.ldt_id,
-                                    ])
+                                         models.Content.objects.get(title=title).iri_id,
+                                         title.encode('utf-8') if title else '',
+                                         myfrontproj.ldt_id,
+                                        ])
         csvfile.close()
         csvfile2.close()