correct css path and error handling + increase version V00.08
authorymh <ymh.work@gmail.com>
Tue, 15 Jun 2010 01:32:34 +0200
changeset 47 8dbd741e3da6
parent 46 50ad1c57838e
child 48 44d58d2e90b5
correct css path and error handling + increase version
web/eulalie/__init__.py
web/ldt/ldt_utils/models.py
web/static/css/LdtPlayer.css
--- a/web/eulalie/__init__.py	Tue Jun 15 01:01:28 2010 +0200
+++ b/web/eulalie/__init__.py	Tue Jun 15 01:32:34 2010 +0200
@@ -1,4 +1,4 @@
-VERSION = (0,7)
+VERSION = (0,8)
 
 VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION)))
 
--- a/web/ldt/ldt_utils/models.py	Tue Jun 15 01:01:28 2010 +0200
+++ b/web/ldt/ldt_utils/models.py	Tue Jun 15 01:32:34 2010 +0200
@@ -50,21 +50,25 @@
     #TODO: better manage the change in .iri name and error scenario (save in temp file + rename
     def save(self):
         # create iri file if needed
+        created = False
         try:
             iri_file_path = self.iri_file_path()
             if not os.path.exists(iri_file_path):
                 dir = os.path.dirname(iri_file_path)
                 if not os.path.exists(dir):
                     os.makedirs(dir)
+                created = True
                 file = open(iri_file_path,"w")
                 create_empty_iri(file, self, "IRI")
             else:
+                created = False
                 update_iri(iri_file_path, self, "IRI")
                 
         except Exception, e:
-            if os.path.exists(iri_file_path):
-                os.remove(iri_file_path)
-                raise e
+            if created:
+                if os.path.exists(iri_file_path):
+                    os.remove(iri_file_path)
+            raise e
         # update it 
         super(Content, self).save()
     
--- a/web/static/css/LdtPlayer.css	Tue Jun 15 01:01:28 2010 +0200
+++ b/web/static/css/LdtPlayer.css	Tue Jun 15 01:32:34 2010 +0200
@@ -8,7 +8,7 @@
 		
 		.tooltip {
 			display:none;
-			background:transparent url(css/jq-css/tooltip/white_arrow.png);
+			background:transparent url(jq-css/tooltip/white_arrow.png);
 			font-size:12px;
 			height:100px;
 			width:180px;